{"action":"created","comment":{"url":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments/134920955","pull_request_review_id":58270199,"id":134920955,"diff_hunk":"@@ -29,126 +30,127 @@ typedef struct DigitalIOData {\n typedef struct DigitalIOSettings {\n   GPIOAddress address;\n   InterruptEdge edge;\n-  DigitalIOData *data;\n } DigitalIOSettings;\n \n // Index the objects using their respective pins\n static DigitalIOData s_input_data[DRIVER_IO_NUM_ADDRESSES];\n \n // Genarate the event based on the identity of the triggering device\n-static uint16_t prv_get_event(DigitalIOData *digital_io_data, GPIOState state) {\n-  uint16_t event_id = digital_io_data->event;\n+static uint16_t prv_get_event(DigitalIOData *data, GPIOState state) {\n+  uint16_t event_id = data->event;\n \n-  if (event_id == DIGITAL_IO_DEVICE_DIRECTION_SELECTOR && state == GPIO_STATE_HIGH) {\n+  if (data->id == DIGITAL_IO_DEVICE_DIRECTION_SELECTOR && state == GPIO_STATE_HIGH) {\n     event_id = INPUT_EVENT_DIRECTION_SELECTOR_NEUTRAL;\n-  } else if (event_id == DIGITAL_IO_DEVICE_TURN_SIGNAL && state == GPIO_STATE_HIGH) {\n+  } else if (data->id == DIGITAL_IO_DEVICE_TURN_SIGNAL && state == GPIO_STATE_LOW) {\n     event_id = INPUT_EVENT_TURN_SIGNAL_NONE;\n   }\n \n   return event_id;\n }\n \n static void prv_input_callback(const GPIOAddress *address, void *context) {\n-  DigitalIOData *data = context;\n+  DigitalIOData *data = (DigitalIOData*)context;\n \n   GPIOState state = { 0 };\n   gpio_get_value(address, &state);\n+\n   event_raise(prv_get_event(data, state), 0);\n }\n \n+/*","path":"projects/driver_controls/src/digital_io.c","position":43,"original_position":43,"commit_id":"1c1df6a2d986c24b4f948de563357d4937d16732","original_commit_id":"1c1df6a2d986c24b4f948de563357d4937d16732","user":{"login":"tituschow","id":5583338,"avatar_url":"https://avatars0.githubusercontent.com/u/5583338?v=4","gravatar_id":"","url":"https://api.github.com/users/tituschow","html_url":"https://github.com/tituschow","followers_url":"https://api.github.com/users/tituschow/followers","following_url":"https://api.github.com/users/tituschow/following{/other_user}","gists_url":"https://api.github.com/users/tituschow/gists{/gist_id}","starred_url":"https://api.github.com/users/tituschow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tituschow/subscriptions","organizations_url":"https://api.github.com/users/tituschow/orgs","repos_url":"https://api.github.com/users/tituschow/repos","events_url":"https://api.github.com/users/tituschow/events{/privacy}","received_events_url":"https://api.github.com/users/tituschow/received_events","type":"User","site_admin":false},"body":"Why is this commented out?","created_at":"2017-08-24T03:45:58Z","updated_at":"2017-08-24T03:45:58Z","html_url":"https://github.com/uw-midsun/firmware/pull/76#discussion_r134920955","pull_request_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments/134920955"},"html":{"href":"https://github.com/uw-midsun/firmware/pull/76#discussion_r134920955"},"pull_request":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/uw-midsun/firmware/pulls/76","id":137318238,"html_url":"https://github.com/uw-midsun/firmware/pull/76","diff_url":"https://github.com/uw-midsun/firmware/pull/76.diff","patch_url":"https://github.com/uw-midsun/firmware/pull/76.patch","issue_url":"https://api.github.com/repos/uw-midsun/firmware/issues/76","number":76,"state":"open","locked":false,"title":"ELEC-262: Driver Controls Cleanup","user":{"login":"Derpalooza","id":14226212,"avatar_url":"https://avatars1.githubusercontent.com/u/14226212?v=4","gravatar_id":"","url":"https://api.github.com/users/Derpalooza","html_url":"https://github.com/Derpalooza","followers_url":"https://api.github.com/users/Derpalooza/followers","following_url":"https://api.github.com/users/Derpalooza/following{/other_user}","gists_url":"https://api.github.com/users/Derpalooza/gists{/gist_id}","starred_url":"https://api.github.com/users/Derpalooza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Derpalooza/subscriptions","organizations_url":"https://api.github.com/users/Derpalooza/orgs","repos_url":"https://api.github.com/users/Derpalooza/repos","events_url":"https://api.github.com/users/Derpalooza/events{/privacy}","received_events_url":"https://api.github.com/users/Derpalooza/received_events","type":"User","site_admin":false},"body":"This PR is to address some of the problems that went uncaught during the original driver controls review. Also, since there wasn't an enforced standard between FSMs on how to prepare data for CAN, I created a new function for the FSMs to delegate CAN event creation to.","created_at":"2017-08-23T21:06:19Z","updated_at":"2017-08-24T03:45:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96bc0b5b61f90a1fae46f7dcaa4bcaf1f9455224","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/76/commits","review_comments_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/76/comments","review_comment_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uw-midsun/firmware/issues/76/comments","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/1c1df6a2d986c24b4f948de563357d4937d16732","head":{"label":"uw-midsun:elec_262_driver_controls_cleanup","ref":"elec_262_driver_controls_cleanup","sha":"1c1df6a2d986c24b4f948de563357d4937d16732","user":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"repo":{"id":69197028,"name":"firmware","full_name":"uw-midsun/firmware","owner":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uw-midsun/firmware","description":"Firmware for MSXII","fork":false,"url":"https://api.github.com/repos/uw-midsun/firmware","forks_url":"https://api.github.com/repos/uw-midsun/firmware/forks","keys_url":"https://api.github.com/repos/uw-midsun/firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uw-midsun/firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uw-midsun/firmware/teams","hooks_url":"https://api.github.com/repos/uw-midsun/firmware/hooks","issue_events_url":"https://api.github.com/repos/uw-midsun/firmware/issues/events{/number}","events_url":"https://api.github.com/repos/uw-midsun/firmware/events","assignees_url":"https://api.github.com/repos/uw-midsun/firmware/assignees{/user}","branches_url":"https://api.github.com/repos/uw-midsun/firmware/branches{/branch}","tags_url":"https://api.github.com/repos/uw-midsun/firmware/tags","blobs_url":"https://api.github.com/repos/uw-midsun/firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uw-midsun/firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uw-midsun/firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/uw-midsun/firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/uw-midsun/firmware/languages","stargazers_url":"https://api.github.com/repos/uw-midsun/firmware/stargazers","contributors_url":"https://api.github.com/repos/uw-midsun/firmware/contributors","subscribers_url":"https://api.github.com/repos/uw-midsun/firmware/subscribers","subscription_url":"https://api.github.com/repos/uw-midsun/firmware/subscription","commits_url":"https://api.github.com/repos/uw-midsun/firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/uw-midsun/firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/uw-midsun/firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/uw-midsun/firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/uw-midsun/firmware/contents/{+path}","compare_url":"https://api.github.com/repos/uw-midsun/firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uw-midsun/firmware/merges","archive_url":"https://api.github.com/repos/uw-midsun/firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uw-midsun/firmware/downloads","issues_url":"https://api.github.com/repos/uw-midsun/firmware/issues{/number}","pulls_url":"https://api.github.com/repos/uw-midsun/firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/uw-midsun/firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/uw-midsun/firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uw-midsun/firmware/labels{/name}","releases_url":"https://api.github.com/repos/uw-midsun/firmware/releases{/id}","deployments_url":"https://api.github.com/repos/uw-midsun/firmware/deployments","created_at":"2016-09-25T23:38:58Z","updated_at":"2016-10-22T19:09:47Z","pushed_at":"2017-08-23T21:06:19Z","git_url":"git://github.com/uw-midsun/firmware.git","ssh_url":"git@github.com:uw-midsun/firmware.git","clone_url":"https://github.com/uw-midsun/firmware.git","svn_url":"https://github.com/uw-midsun/firmware","homepage":"","size":2165,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"uw-midsun:master","ref":"master","sha":"c65e0756a9612c797ef9719fbc639e5e26bc5f94","user":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"repo":{"id":69197028,"name":"firmware","full_name":"uw-midsun/firmware","owner":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uw-midsun/firmware","description":"Firmware for MSXII","fork":false,"url":"https://api.github.com/repos/uw-midsun/firmware","forks_url":"https://api.github.com/repos/uw-midsun/firmware/forks","keys_url":"https://api.github.com/repos/uw-midsun/firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uw-midsun/firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uw-midsun/firmware/teams","hooks_url":"https://api.github.com/repos/uw-midsun/firmware/hooks","issue_events_url":"https://api.github.com/repos/uw-midsun/firmware/issues/events{/number}","events_url":"https://api.github.com/repos/uw-midsun/firmware/events","assignees_url":"https://api.github.com/repos/uw-midsun/firmware/assignees{/user}","branches_url":"https://api.github.com/repos/uw-midsun/firmware/branches{/branch}","tags_url":"https://api.github.com/repos/uw-midsun/firmware/tags","blobs_url":"https://api.github.com/repos/uw-midsun/firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uw-midsun/firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uw-midsun/firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/uw-midsun/firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/uw-midsun/firmware/languages","stargazers_url":"https://api.github.com/repos/uw-midsun/firmware/stargazers","contributors_url":"https://api.github.com/repos/uw-midsun/firmware/contributors","subscribers_url":"https://api.github.com/repos/uw-midsun/firmware/subscribers","subscription_url":"https://api.github.com/repos/uw-midsun/firmware/subscription","commits_url":"https://api.github.com/repos/uw-midsun/firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/uw-midsun/firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/uw-midsun/firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/uw-midsun/firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/uw-midsun/firmware/contents/{+path}","compare_url":"https://api.github.com/repos/uw-midsun/firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uw-midsun/firmware/merges","archive_url":"https://api.github.com/repos/uw-midsun/firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uw-midsun/firmware/downloads","issues_url":"https://api.github.com/repos/uw-midsun/firmware/issues{/number}","pulls_url":"https://api.github.com/repos/uw-midsun/firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/uw-midsun/firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/uw-midsun/firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uw-midsun/firmware/labels{/name}","releases_url":"https://api.github.com/repos/uw-midsun/firmware/releases{/id}","deployments_url":"https://api.github.com/repos/uw-midsun/firmware/deployments","created_at":"2016-09-25T23:38:58Z","updated_at":"2016-10-22T19:09:47Z","pushed_at":"2017-08-23T21:06:19Z","git_url":"git://github.com/uw-midsun/firmware.git","ssh_url":"git@github.com:uw-midsun/firmware.git","clone_url":"https://github.com/uw-midsun/firmware.git","svn_url":"https://github.com/uw-midsun/firmware","homepage":"","size":2165,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/76"},"html":{"href":"https://github.com/uw-midsun/firmware/pull/76"},"issue":{"href":"https://api.github.com/repos/uw-midsun/firmware/issues/76"},"comments":{"href":"https://api.github.com/repos/uw-midsun/firmware/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/uw-midsun/firmware/statuses/1c1df6a2d986c24b4f948de563357d4937d16732"}}}}
{"actor":{"display_login":"tituschow"}}