{"action":"created","comment":{"url":"https://api.github.com/repos/ms-iot/lightning/pulls/comments/47683723","id":47683723,"diff_hunk":"@@ -400,32 +415,13 @@ HRESULT PCA9685Device::_InitializeChip(ULONG i2cAdr)\n             transaction.useHighSpeed();\n \n             // Queue sending the address of the MODE1 regeister to the PWM chip.\n-            hr = transaction.queueWrite(mode1RegAdr, sizeof(mode1RegAdr));\n+            hr = transaction.queueWrite(mode1RegAdr, sizeof(mode1RegAdr), TRUE);\n         }\n \n         if (SUCCEEDED(hr))\n         {\n-            // Queue reading the contents of the MODE1 register.\n-            hr = transaction.queueRead(readBuf, sizeof(readBuf));\n-        }\n-\n-        //\n-        // If the SLEEP bit is clear, the chip has been initialize: abort the rest of the transaction.\n-        //\n-\n-        if (SUCCEEDED(hr))\n-        {\n-            // Register a callback to test if the chip is initialized.\n-            hr = transaction.queueCallback([&readBuf, &transaction]()\n-            {\n-                PMODE1 mode1RegPtr = (PMODE1)readBuf;\n-                if (mode1RegPtr->SLEEP == 0)   // If chip is not in sleep mode,\n-                {\n-                    transaction.abort();\n-                }\n-                return S_OK;\n-            }\n-            );\n+            // Put the chip to sleep.\n+            hr = transaction.queueWrite((PUCHAR)&mode1RegSleep, 1);","path":"source/PCA9685Support.cpp","position":70,"original_position":70,"commit_id":"3565b79eca030b8328a3c10185219d275ce48d0d","original_commit_id":"3565b79eca030b8328a3c10185219d275ce48d0d","user":{"login":"ooeygui","id":4564624,"avatar_url":"https://avatars.githubusercontent.com/u/4564624?v=3","gravatar_id":"","url":"https://api.github.com/users/ooeygui","html_url":"https://github.com/ooeygui","followers_url":"https://api.github.com/users/ooeygui/followers","following_url":"https://api.github.com/users/ooeygui/following{/other_user}","gists_url":"https://api.github.com/users/ooeygui/gists{/gist_id}","starred_url":"https://api.github.com/users/ooeygui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooeygui/subscriptions","organizations_url":"https://api.github.com/users/ooeygui/orgs","repos_url":"https://api.github.com/users/ooeygui/repos","events_url":"https://api.github.com/users/ooeygui/events{/privacy}","received_events_url":"https://api.github.com/users/ooeygui/received_events","type":"User","site_admin":false},"body":"I hit bugs on app restart. This clears it up nicely.","created_at":"2015-12-15T19:16:46Z","updated_at":"2015-12-15T19:16:46Z","html_url":"https://github.com/ms-iot/lightning/pull/27#discussion_r47683723","pull_request_url":"https://api.github.com/repos/ms-iot/lightning/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/ms-iot/lightning/pulls/comments/47683723"},"html":{"href":"https://github.com/ms-iot/lightning/pull/27#discussion_r47683723"},"pull_request":{"href":"https://api.github.com/repos/ms-iot/lightning/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/ms-iot/lightning/pulls/27","id":53454486,"html_url":"https://github.com/ms-iot/lightning/pull/27","diff_url":"https://github.com/ms-iot/lightning/pull/27.diff","patch_url":"https://github.com/ms-iot/lightning/pull/27.patch","issue_url":"https://api.github.com/repos/ms-iot/lightning/issues/27","number":27,"state":"open","locked":false,"title":"Add Loopback Test, minor fixes","user":{"login":"ooeygui","id":4564624,"avatar_url":"https://avatars.githubusercontent.com/u/4564624?v=3","gravatar_id":"","url":"https://api.github.com/users/ooeygui","html_url":"https://github.com/ooeygui","followers_url":"https://api.github.com/users/ooeygui/followers","following_url":"https://api.github.com/users/ooeygui/following{/other_user}","gists_url":"https://api.github.com/users/ooeygui/gists{/gist_id}","starred_url":"https://api.github.com/users/ooeygui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooeygui/subscriptions","organizations_url":"https://api.github.com/users/ooeygui/orgs","repos_url":"https://api.github.com/users/ooeygui/repos","events_url":"https://api.github.com/users/ooeygui/events{/privacy}","received_events_url":"https://api.github.com/users/ooeygui/received_events","type":"User","site_admin":false},"body":"Added loopback testing and a Pi Hat which implements ADC, PWM and GPIO loopback.\r\nAdded PCA9685 Restart logic\r\nAdded documentation to the MCP3008 readValue.\r\nFixed pin ID in Pi ADC\r\n","created_at":"2015-12-11T22:51:55Z","updated_at":"2015-12-15T19:16:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"928863f600f41a2f86dae1c3c18789c5c5594afd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ms-iot/lightning/pulls/27/commits","review_comments_url":"https://api.github.com/repos/ms-iot/lightning/pulls/27/comments","review_comment_url":"https://api.github.com/repos/ms-iot/lightning/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ms-iot/lightning/issues/27/comments","statuses_url":"https://api.github.com/repos/ms-iot/lightning/statuses/3565b79eca030b8328a3c10185219d275ce48d0d","head":{"label":"ooeygui:develop","ref":"develop","sha":"3565b79eca030b8328a3c10185219d275ce48d0d","user":{"login":"ooeygui","id":4564624,"avatar_url":"https://avatars.githubusercontent.com/u/4564624?v=3","gravatar_id":"","url":"https://api.github.com/users/ooeygui","html_url":"https://github.com/ooeygui","followers_url":"https://api.github.com/users/ooeygui/followers","following_url":"https://api.github.com/users/ooeygui/following{/other_user}","gists_url":"https://api.github.com/users/ooeygui/gists{/gist_id}","starred_url":"https://api.github.com/users/ooeygui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooeygui/subscriptions","organizations_url":"https://api.github.com/users/ooeygui/orgs","repos_url":"https://api.github.com/users/ooeygui/repos","events_url":"https://api.github.com/users/ooeygui/events{/privacy}","received_events_url":"https://api.github.com/users/ooeygui/received_events","type":"User","site_admin":false},"repo":{"id":47576395,"name":"lightning","full_name":"ooeygui/lightning","owner":{"login":"ooeygui","id":4564624,"avatar_url":"https://avatars.githubusercontent.com/u/4564624?v=3","gravatar_id":"","url":"https://api.github.com/users/ooeygui","html_url":"https://github.com/ooeygui","followers_url":"https://api.github.com/users/ooeygui/followers","following_url":"https://api.github.com/users/ooeygui/following{/other_user}","gists_url":"https://api.github.com/users/ooeygui/gists{/gist_id}","starred_url":"https://api.github.com/users/ooeygui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooeygui/subscriptions","organizations_url":"https://api.github.com/users/ooeygui/orgs","repos_url":"https://api.github.com/users/ooeygui/repos","events_url":"https://api.github.com/users/ooeygui/events{/privacy}","received_events_url":"https://api.github.com/users/ooeygui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ooeygui/lightning","description":"","fork":true,"url":"https://api.github.com/repos/ooeygui/lightning","forks_url":"https://api.github.com/repos/ooeygui/lightning/forks","keys_url":"https://api.github.com/repos/ooeygui/lightning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ooeygui/lightning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ooeygui/lightning/teams","hooks_url":"https://api.github.com/repos/ooeygui/lightning/hooks","issue_events_url":"https://api.github.com/repos/ooeygui/lightning/issues/events{/number}","events_url":"https://api.github.com/repos/ooeygui/lightning/events","assignees_url":"https://api.github.com/repos/ooeygui/lightning/assignees{/user}","branches_url":"https://api.github.com/repos/ooeygui/lightning/branches{/branch}","tags_url":"https://api.github.com/repos/ooeygui/lightning/tags","blobs_url":"https://api.github.com/repos/ooeygui/lightning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ooeygui/lightning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ooeygui/lightning/git/refs{/sha}","trees_url":"https://api.github.com/repos/ooeygui/lightning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ooeygui/lightning/statuses/{sha}","languages_url":"https://api.github.com/repos/ooeygui/lightning/languages","stargazers_url":"https://api.github.com/repos/ooeygui/lightning/stargazers","contributors_url":"https://api.github.com/repos/ooeygui/lightning/contributors","subscribers_url":"https://api.github.com/repos/ooeygui/lightning/subscribers","subscription_url":"https://api.github.com/repos/ooeygui/lightning/subscription","commits_url":"https://api.github.com/repos/ooeygui/lightning/commits{/sha}","git_commits_url":"https://api.github.com/repos/ooeygui/lightning/git/commits{/sha}","comments_url":"https://api.github.com/repos/ooeygui/lightning/comments{/number}","issue_comment_url":"https://api.github.com/repos/ooeygui/lightning/issues/comments{/number}","contents_url":"https://api.github.com/repos/ooeygui/lightning/contents/{+path}","compare_url":"https://api.github.com/repos/ooeygui/lightning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ooeygui/lightning/merges","archive_url":"https://api.github.com/repos/ooeygui/lightning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ooeygui/lightning/downloads","issues_url":"https://api.github.com/repos/ooeygui/lightning/issues{/number}","pulls_url":"https://api.github.com/repos/ooeygui/lightning/pulls{/number}","milestones_url":"https://api.github.com/repos/ooeygui/lightning/milestones{/number}","notifications_url":"https://api.github.com/repos/ooeygui/lightning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ooeygui/lightning/labels{/name}","releases_url":"https://api.github.com/repos/ooeygui/lightning/releases{/id}","created_at":"2015-12-07T20:09:20Z","updated_at":"2015-12-07T20:09:21Z","pushed_at":"2015-12-11T22:49:40Z","git_url":"git://github.com/ooeygui/lightning.git","ssh_url":"git@github.com:ooeygui/lightning.git","clone_url":"https://github.com/ooeygui/lightning.git","svn_url":"https://github.com/ooeygui/lightning","homepage":null,"size":1177,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ms-iot:develop","ref":"develop","sha":"0273762a4befcc3c107f587968ba8ccb138548c6","user":{"login":"ms-iot","id":7927770,"avatar_url":"https://avatars.githubusercontent.com/u/7927770?v=3","gravatar_id":"","url":"https://api.github.com/users/ms-iot","html_url":"https://github.com/ms-iot","followers_url":"https://api.github.com/users/ms-iot/followers","following_url":"https://api.github.com/users/ms-iot/following{/other_user}","gists_url":"https://api.github.com/users/ms-iot/gists{/gist_id}","starred_url":"https://api.github.com/users/ms-iot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms-iot/subscriptions","organizations_url":"https://api.github.com/users/ms-iot/orgs","repos_url":"https://api.github.com/users/ms-iot/repos","events_url":"https://api.github.com/users/ms-iot/events{/privacy}","received_events_url":"https://api.github.com/users/ms-iot/received_events","type":"Organization","site_admin":false},"repo":{"id":43386233,"name":"lightning","full_name":"ms-iot/lightning","owner":{"login":"ms-iot","id":7927770,"avatar_url":"https://avatars.githubusercontent.com/u/7927770?v=3","gravatar_id":"","url":"https://api.github.com/users/ms-iot","html_url":"https://github.com/ms-iot","followers_url":"https://api.github.com/users/ms-iot/followers","following_url":"https://api.github.com/users/ms-iot/following{/other_user}","gists_url":"https://api.github.com/users/ms-iot/gists{/gist_id}","starred_url":"https://api.github.com/users/ms-iot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms-iot/subscriptions","organizations_url":"https://api.github.com/users/ms-iot/orgs","repos_url":"https://api.github.com/users/ms-iot/repos","events_url":"https://api.github.com/users/ms-iot/events{/privacy}","received_events_url":"https://api.github.com/users/ms-iot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ms-iot/lightning","description":"","fork":false,"url":"https://api.github.com/repos/ms-iot/lightning","forks_url":"https://api.github.com/repos/ms-iot/lightning/forks","keys_url":"https://api.github.com/repos/ms-iot/lightning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ms-iot/lightning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ms-iot/lightning/teams","hooks_url":"https://api.github.com/repos/ms-iot/lightning/hooks","issue_events_url":"https://api.github.com/repos/ms-iot/lightning/issues/events{/number}","events_url":"https://api.github.com/repos/ms-iot/lightning/events","assignees_url":"https://api.github.com/repos/ms-iot/lightning/assignees{/user}","branches_url":"https://api.github.com/repos/ms-iot/lightning/branches{/branch}","tags_url":"https://api.github.com/repos/ms-iot/lightning/tags","blobs_url":"https://api.github.com/repos/ms-iot/lightning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ms-iot/lightning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ms-iot/lightning/git/refs{/sha}","trees_url":"https://api.github.com/repos/ms-iot/lightning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ms-iot/lightning/statuses/{sha}","languages_url":"https://api.github.com/repos/ms-iot/lightning/languages","stargazers_url":"https://api.github.com/repos/ms-iot/lightning/stargazers","contributors_url":"https://api.github.com/repos/ms-iot/lightning/contributors","subscribers_url":"https://api.github.com/repos/ms-iot/lightning/subscribers","subscription_url":"https://api.github.com/repos/ms-iot/lightning/subscription","commits_url":"https://api.github.com/repos/ms-iot/lightning/commits{/sha}","git_commits_url":"https://api.github.com/repos/ms-iot/lightning/git/commits{/sha}","comments_url":"https://api.github.com/repos/ms-iot/lightning/comments{/number}","issue_comment_url":"https://api.github.com/repos/ms-iot/lightning/issues/comments{/number}","contents_url":"https://api.github.com/repos/ms-iot/lightning/contents/{+path}","compare_url":"https://api.github.com/repos/ms-iot/lightning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ms-iot/lightning/merges","archive_url":"https://api.github.com/repos/ms-iot/lightning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ms-iot/lightning/downloads","issues_url":"https://api.github.com/repos/ms-iot/lightning/issues{/number}","pulls_url":"https://api.github.com/repos/ms-iot/lightning/pulls{/number}","milestones_url":"https://api.github.com/repos/ms-iot/lightning/milestones{/number}","notifications_url":"https://api.github.com/repos/ms-iot/lightning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ms-iot/lightning/labels{/name}","releases_url":"https://api.github.com/repos/ms-iot/lightning/releases{/id}","created_at":"2015-09-29T18:27:30Z","updated_at":"2015-10-14T23:59:25Z","pushed_at":"2015-12-14T21:19:48Z","git_url":"git://github.com/ms-iot/lightning.git","ssh_url":"git@github.com:ms-iot/lightning.git","clone_url":"https://github.com/ms-iot/lightning.git","svn_url":"https://github.com/ms-iot/lightning","homepage":null,"size":1180,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ms-iot/lightning/pulls/27"},"html":{"href":"https://github.com/ms-iot/lightning/pull/27"},"issue":{"href":"https://api.github.com/repos/ms-iot/lightning/issues/27"},"comments":{"href":"https://api.github.com/repos/ms-iot/lightning/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/ms-iot/lightning/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/ms-iot/lightning/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ms-iot/lightning/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/ms-iot/lightning/statuses/3565b79eca030b8328a3c10185219d275ce48d0d"}}}}