{"action":"created","comment":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments/48754004","id":48754004,"diff_hunk":"@@ -25,6 +25,18 @@ using namespace Linux;\n \n static const AP_HAL::HAL& hal = AP_HAL::get_HAL();\n \n+#define UINT32_MAX_STR \"4294967295\"\n+\n+/* Trick to use minimum stack space for each of the params */\n+union gpio_params {\n+    char export_gpio[sizeof(\"export\")];\n+    char direction[sizeof(\"gpio\" UINT32_MAX_STR \"/direction\")];\n+    char value[sizeof(\"gpio\" UINT32_MAX_STR \"/value\")];\n+};\n+\n+#define GPIO_BASE_PATH \"/sys/class/gpio/\"\n+#define GPIO_PATH_MAX (sizeof(GPIO_BASE_PATH) + sizeof(gpio_params) - 1)\n+","path":"libraries/AP_HAL_Linux/GPIO_Sysfs.cpp","position":32,"original_position":32,"commit_id":"17bd01bc35811543aeac7721828d64381371adc9","original_commit_id":"17bd01bc35811543aeac7721828d64381371adc9","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"body":"I may be biased because I wrote the hack in the first place hehehe. But I still like it :)... I hate hardcoding the numbers to later find out it's not sufficient.","created_at":"2016-01-04T17:12:13Z","updated_at":"2016-01-04T17:12:13Z","html_url":"https://github.com/diydrones/ardupilot/pull/3404#discussion_r48754004","pull_request_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404","_links":{"self":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments/48754004"},"html":{"href":"https://github.com/diydrones/ardupilot/pull/3404#discussion_r48754004"},"pull_request":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404"}}},"pull_request":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404","id":54829637,"html_url":"https://github.com/diydrones/ardupilot/pull/3404","diff_url":"https://github.com/diydrones/ardupilot/pull/3404.diff","patch_url":"https://github.com/diydrones/ardupilot/pull/3404.patch","issue_url":"https://api.github.com/repos/diydrones/ardupilot/issues/3404","number":3404,"state":"open","locked":false,"title":"AP_HAL_Linux: GPIO improvements (v2)","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"body":"New version of #3205 \r\n\r\nSlightly changed the first commit message and added a new commit to remove the _export_pins() method.\r\n\r\n@zehortigoza could you take a look?","created_at":"2015-12-30T21:06:08Z","updated_at":"2016-01-04T17:12:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fceb0cdfeb0bdba6de40c4c4abeaf042b76620c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404/commits","review_comments_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404/comments","review_comment_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/issues/3404/comments","statuses_url":"https://api.github.com/repos/diydrones/ardupilot/statuses/17bd01bc35811543aeac7721828d64381371adc9","head":{"label":"lucasdemarchi:review/pr-3205","ref":"review/pr-3205","sha":"17bd01bc35811543aeac7721828d64381371adc9","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"repo":{"id":32772713,"name":"ardupilot","full_name":"lucasdemarchi/ardupilot","owner":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucasdemarchi/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":true,"url":"https://api.github.com/repos/lucasdemarchi/ardupilot","forks_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/forks","keys_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/teams","hooks_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/events","assignees_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/tags","blobs_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/languages","stargazers_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/subscription","commits_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/merges","archive_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/downloads","issues_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/releases{/id}","created_at":"2015-03-24T02:59:29Z","updated_at":"2015-05-04T19:09:52Z","pushed_at":"2016-01-01T22:35:36Z","git_url":"git://github.com/lucasdemarchi/ardupilot.git","ssh_url":"git@github.com:lucasdemarchi/ardupilot.git","clone_url":"https://github.com/lucasdemarchi/ardupilot.git","svn_url":"https://github.com/lucasdemarchi/ardupilot","homepage":"http://ardupilot.com/","size":76247,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"diydrones:master","ref":"master","sha":"02cfbb25b0e733b18cbe118574c269d72c99324e","user":{"login":"diydrones","id":3189387,"avatar_url":"https://avatars.githubusercontent.com/u/3189387?v=3","gravatar_id":"","url":"https://api.github.com/users/diydrones","html_url":"https://github.com/diydrones","followers_url":"https://api.github.com/users/diydrones/followers","following_url":"https://api.github.com/users/diydrones/following{/other_user}","gists_url":"https://api.github.com/users/diydrones/gists{/gist_id}","starred_url":"https://api.github.com/users/diydrones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diydrones/subscriptions","organizations_url":"https://api.github.com/users/diydrones/orgs","repos_url":"https://api.github.com/users/diydrones/repos","events_url":"https://api.github.com/users/diydrones/events{/privacy}","received_events_url":"https://api.github.com/users/diydrones/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"diydrones/ardupilot","owner":{"login":"diydrones","id":3189387,"avatar_url":"https://avatars.githubusercontent.com/u/3189387?v=3","gravatar_id":"","url":"https://api.github.com/users/diydrones","html_url":"https://github.com/diydrones","followers_url":"https://api.github.com/users/diydrones/followers","following_url":"https://api.github.com/users/diydrones/following{/other_user}","gists_url":"https://api.github.com/users/diydrones/gists{/gist_id}","starred_url":"https://api.github.com/users/diydrones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diydrones/subscriptions","organizations_url":"https://api.github.com/users/diydrones/orgs","repos_url":"https://api.github.com/users/diydrones/repos","events_url":"https://api.github.com/users/diydrones/events{/privacy}","received_events_url":"https://api.github.com/users/diydrones/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diydrones/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":false,"url":"https://api.github.com/repos/diydrones/ardupilot","forks_url":"https://api.github.com/repos/diydrones/ardupilot/forks","keys_url":"https://api.github.com/repos/diydrones/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diydrones/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diydrones/ardupilot/teams","hooks_url":"https://api.github.com/repos/diydrones/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/diydrones/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/diydrones/ardupilot/events","assignees_url":"https://api.github.com/repos/diydrones/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/diydrones/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/diydrones/ardupilot/tags","blobs_url":"https://api.github.com/repos/diydrones/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diydrones/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diydrones/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/diydrones/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diydrones/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/diydrones/ardupilot/languages","stargazers_url":"https://api.github.com/repos/diydrones/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/diydrones/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/diydrones/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/diydrones/ardupilot/subscription","commits_url":"https://api.github.com/repos/diydrones/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/diydrones/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/diydrones/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/diydrones/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/diydrones/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diydrones/ardupilot/merges","archive_url":"https://api.github.com/repos/diydrones/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diydrones/ardupilot/downloads","issues_url":"https://api.github.com/repos/diydrones/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/diydrones/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/diydrones/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/diydrones/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diydrones/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/diydrones/ardupilot/releases{/id}","created_at":"2013-01-09T00:58:52Z","updated_at":"2016-01-04T10:43:06Z","pushed_at":"2016-01-04T16:57:32Z","git_url":"git://github.com/diydrones/ardupilot.git","ssh_url":"git@github.com:diydrones/ardupilot.git","clone_url":"https://github.com/diydrones/ardupilot.git","svn_url":"https://github.com/diydrones/ardupilot","homepage":"http://ardupilot.com/","size":107858,"stargazers_count":1610,"watchers_count":1610,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3260,"mirror_url":null,"open_issues_count":625,"forks":3260,"open_issues":625,"watchers":1610,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404"},"html":{"href":"https://github.com/diydrones/ardupilot/pull/3404"},"issue":{"href":"https://api.github.com/repos/diydrones/ardupilot/issues/3404"},"comments":{"href":"https://api.github.com/repos/diydrones/ardupilot/issues/3404/comments"},"review_comments":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404/comments"},"review_comment":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3404/commits"},"statuses":{"href":"https://api.github.com/repos/diydrones/ardupilot/statuses/17bd01bc35811543aeac7721828d64381371adc9"}}}}