{"action":"created","comment":{"url":"https://api.github.com/repos/d-ronin/dRonin/pulls/comments/78129147","id":78129147,"diff_hunk":"@@ -248,7 +250,13 @@ void PIOS_Servo_SetMode(const uint16_t *out_rate, const int banks, const uint16_\n \t\t\tconst struct pios_tim_channel *chan = &servo_cfg->channels[j];\n \t\t\tif (timer_banks[i].timer == chan->timer) {\n \t\t\t\t/* save the frequency for these channels */\n-\t\t\t\toutput_channel_mode[j] = (out_rate[i] == 0) ? SYNC_PWM : REGULAR_PWM;\n+\t\t\t\tif (out_rate[i] == 0) {\n+\t\t\t\t\toutput_channel_mode[j] = SYNC_PWM;\n+\t\t\t\t} else if (channel_max[j] >= channel_min[j]) {\n+\t\t\t\t\toutput_channel_mode[j] = REGULAR_PWM;\n+\t\t\t\t} else {\n+\t\t\t\t\toutput_channel_mode[j] = REGULAR_INVERTED_PWM;\n+\t\t\t\t}","path":"flight/PiOS/STM32/pios_servo.c","position":22,"original_position":22,"commit_id":"fc3b099a0f01ad0788eee7620f330bc76101a7a3","original_commit_id":"fc3b099a0f01ad0788eee7620f330bc76101a7a3","user":{"login":"tracernz","id":9995998,"avatar_url":"https://avatars.githubusercontent.com/u/9995998?v=3","gravatar_id":"","url":"https://api.github.com/users/tracernz","html_url":"https://github.com/tracernz","followers_url":"https://api.github.com/users/tracernz/followers","following_url":"https://api.github.com/users/tracernz/following{/other_user}","gists_url":"https://api.github.com/users/tracernz/gists{/gist_id}","starred_url":"https://api.github.com/users/tracernz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tracernz/subscriptions","organizations_url":"https://api.github.com/users/tracernz/orgs","repos_url":"https://api.github.com/users/tracernz/repos","events_url":"https://api.github.com/users/tracernz/events{/privacy}","received_events_url":"https://api.github.com/users/tracernz/received_events","type":"User","site_admin":false},"body":"Doesn't handle inverted SyncPWM, which is a perfectly fine configuration.","created_at":"2016-09-09T05:00:35Z","updated_at":"2016-09-09T05:00:35Z","html_url":"https://github.com/d-ronin/dRonin/pull/1324#discussion_r78129147","pull_request_url":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324","_links":{"self":{"href":"https://api.github.com/repos/d-ronin/dRonin/pulls/comments/78129147"},"html":{"href":"https://github.com/d-ronin/dRonin/pull/1324#discussion_r78129147"},"pull_request":{"href":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324"}}},"pull_request":{"url":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324","id":84587805,"html_url":"https://github.com/d-ronin/dRonin/pull/1324","diff_url":"https://github.com/d-ronin/dRonin/pull/1324.diff","patch_url":"https://github.com/d-ronin/dRonin/pull/1324.patch","issue_url":"https://api.github.com/repos/d-ronin/dRonin/issues/1324","number":1324,"state":"open","locked":false,"title":"firmwareiap: stop PWM before reset (when appropriate)","user":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"body":"Opened in relation to #1216, where @ufoDziner has a reliable repro.\r\n\r\nSupersedes #720.\r\n\r\nNeeds to wait for #1323 / build to be fixed before building artifacts.","created_at":"2016-09-09T03:15:39Z","updated_at":"2016-09-09T05:00:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"371eaa6caa16cc2e67fabaf4f59706ec38e5f2e1","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/d-ronin/dRonin/milestones/4","html_url":"https://github.com/d-ronin/dRonin/milestones/Quixote","labels_url":"https://api.github.com/repos/d-ronin/dRonin/milestones/4/labels","id":1617082,"number":4,"title":"Quixote","description":"","creator":{"login":"tracernz","id":9995998,"avatar_url":"https://avatars.githubusercontent.com/u/9995998?v=3","gravatar_id":"","url":"https://api.github.com/users/tracernz","html_url":"https://github.com/tracernz","followers_url":"https://api.github.com/users/tracernz/followers","following_url":"https://api.github.com/users/tracernz/following{/other_user}","gists_url":"https://api.github.com/users/tracernz/gists{/gist_id}","starred_url":"https://api.github.com/users/tracernz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tracernz/subscriptions","organizations_url":"https://api.github.com/users/tracernz/orgs","repos_url":"https://api.github.com/users/tracernz/repos","events_url":"https://api.github.com/users/tracernz/events{/privacy}","received_events_url":"https://api.github.com/users/tracernz/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":172,"state":"open","created_at":"2016-03-02T06:26:15Z","updated_at":"2016-09-09T04:01:38Z","due_on":"2016-10-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324/commits","review_comments_url":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324/comments","review_comment_url":"https://api.github.com/repos/d-ronin/dRonin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/d-ronin/dRonin/issues/1324/comments","statuses_url":"https://api.github.com/repos/d-ronin/dRonin/statuses/fc3b099a0f01ad0788eee7620f330bc76101a7a3","head":{"label":"mlyle:mpl-pwmresetstop","ref":"mpl-pwmresetstop","sha":"fc3b099a0f01ad0788eee7620f330bc76101a7a3","user":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"repo":{"id":43623642,"name":"dronin","full_name":"mlyle/dronin","owner":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlyle/dronin","description":"The dRonin' flight controller software.","fork":true,"url":"https://api.github.com/repos/mlyle/dronin","forks_url":"https://api.github.com/repos/mlyle/dronin/forks","keys_url":"https://api.github.com/repos/mlyle/dronin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlyle/dronin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlyle/dronin/teams","hooks_url":"https://api.github.com/repos/mlyle/dronin/hooks","issue_events_url":"https://api.github.com/repos/mlyle/dronin/issues/events{/number}","events_url":"https://api.github.com/repos/mlyle/dronin/events","assignees_url":"https://api.github.com/repos/mlyle/dronin/assignees{/user}","branches_url":"https://api.github.com/repos/mlyle/dronin/branches{/branch}","tags_url":"https://api.github.com/repos/mlyle/dronin/tags","blobs_url":"https://api.github.com/repos/mlyle/dronin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlyle/dronin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlyle/dronin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlyle/dronin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlyle/dronin/statuses/{sha}","languages_url":"https://api.github.com/repos/mlyle/dronin/languages","stargazers_url":"https://api.github.com/repos/mlyle/dronin/stargazers","contributors_url":"https://api.github.com/repos/mlyle/dronin/contributors","subscribers_url":"https://api.github.com/repos/mlyle/dronin/subscribers","subscription_url":"https://api.github.com/repos/mlyle/dronin/subscription","commits_url":"https://api.github.com/repos/mlyle/dronin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlyle/dronin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlyle/dronin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlyle/dronin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlyle/dronin/contents/{+path}","compare_url":"https://api.github.com/repos/mlyle/dronin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlyle/dronin/merges","archive_url":"https://api.github.com/repos/mlyle/dronin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlyle/dronin/downloads","issues_url":"https://api.github.com/repos/mlyle/dronin/issues{/number}","pulls_url":"https://api.github.com/repos/mlyle/dronin/pulls{/number}","milestones_url":"https://api.github.com/repos/mlyle/dronin/milestones{/number}","notifications_url":"https://api.github.com/repos/mlyle/dronin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlyle/dronin/labels{/name}","releases_url":"https://api.github.com/repos/mlyle/dronin/releases{/id}","deployments_url":"https://api.github.com/repos/mlyle/dronin/deployments","created_at":"2015-10-04T03:25:31Z","updated_at":"2015-12-10T00:31:19Z","pushed_at":"2016-09-09T04:25:28Z","git_url":"git://github.com/mlyle/dronin.git","ssh_url":"git@github.com:mlyle/dronin.git","clone_url":"https://github.com/mlyle/dronin.git","svn_url":"https://github.com/mlyle/dronin","homepage":null,"size":236579,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"next"}},"base":{"label":"d-ronin:next","ref":"next","sha":"a3dc432911db16c421c74109b7eab4e087d49de2","user":{"login":"d-ronin","id":14959302,"avatar_url":"https://avatars.githubusercontent.com/u/14959302?v=3","gravatar_id":"","url":"https://api.github.com/users/d-ronin","html_url":"https://github.com/d-ronin","followers_url":"https://api.github.com/users/d-ronin/followers","following_url":"https://api.github.com/users/d-ronin/following{/other_user}","gists_url":"https://api.github.com/users/d-ronin/gists{/gist_id}","starred_url":"https://api.github.com/users/d-ronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-ronin/subscriptions","organizations_url":"https://api.github.com/users/d-ronin/orgs","repos_url":"https://api.github.com/users/d-ronin/repos","events_url":"https://api.github.com/users/d-ronin/events{/privacy}","received_events_url":"https://api.github.com/users/d-ronin/received_events","type":"Organization","site_admin":false},"repo":{"id":43620723,"name":"dRonin","full_name":"d-ronin/dRonin","owner":{"login":"d-ronin","id":14959302,"avatar_url":"https://avatars.githubusercontent.com/u/14959302?v=3","gravatar_id":"","url":"https://api.github.com/users/d-ronin","html_url":"https://github.com/d-ronin","followers_url":"https://api.github.com/users/d-ronin/followers","following_url":"https://api.github.com/users/d-ronin/following{/other_user}","gists_url":"https://api.github.com/users/d-ronin/gists{/gist_id}","starred_url":"https://api.github.com/users/d-ronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-ronin/subscriptions","organizations_url":"https://api.github.com/users/d-ronin/orgs","repos_url":"https://api.github.com/users/d-ronin/repos","events_url":"https://api.github.com/users/d-ronin/events{/privacy}","received_events_url":"https://api.github.com/users/d-ronin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/d-ronin/dRonin","description":"The dRonin flight controller software.","fork":false,"url":"https://api.github.com/repos/d-ronin/dRonin","forks_url":"https://api.github.com/repos/d-ronin/dRonin/forks","keys_url":"https://api.github.com/repos/d-ronin/dRonin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/d-ronin/dRonin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/d-ronin/dRonin/teams","hooks_url":"https://api.github.com/repos/d-ronin/dRonin/hooks","issue_events_url":"https://api.github.com/repos/d-ronin/dRonin/issues/events{/number}","events_url":"https://api.github.com/repos/d-ronin/dRonin/events","assignees_url":"https://api.github.com/repos/d-ronin/dRonin/assignees{/user}","branches_url":"https://api.github.com/repos/d-ronin/dRonin/branches{/branch}","tags_url":"https://api.github.com/repos/d-ronin/dRonin/tags","blobs_url":"https://api.github.com/repos/d-ronin/dRonin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/d-ronin/dRonin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/d-ronin/dRonin/git/refs{/sha}","trees_url":"https://api.github.com/repos/d-ronin/dRonin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/d-ronin/dRonin/statuses/{sha}","languages_url":"https://api.github.com/repos/d-ronin/dRonin/languages","stargazers_url":"https://api.github.com/repos/d-ronin/dRonin/stargazers","contributors_url":"https://api.github.com/repos/d-ronin/dRonin/contributors","subscribers_url":"https://api.github.com/repos/d-ronin/dRonin/subscribers","subscription_url":"https://api.github.com/repos/d-ronin/dRonin/subscription","commits_url":"https://api.github.com/repos/d-ronin/dRonin/commits{/sha}","git_commits_url":"https://api.github.com/repos/d-ronin/dRonin/git/commits{/sha}","comments_url":"https://api.github.com/repos/d-ronin/dRonin/comments{/number}","issue_comment_url":"https://api.github.com/repos/d-ronin/dRonin/issues/comments{/number}","contents_url":"https://api.github.com/repos/d-ronin/dRonin/contents/{+path}","compare_url":"https://api.github.com/repos/d-ronin/dRonin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/d-ronin/dRonin/merges","archive_url":"https://api.github.com/repos/d-ronin/dRonin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/d-ronin/dRonin/downloads","issues_url":"https://api.github.com/repos/d-ronin/dRonin/issues{/number}","pulls_url":"https://api.github.com/repos/d-ronin/dRonin/pulls{/number}","milestones_url":"https://api.github.com/repos/d-ronin/dRonin/milestones{/number}","notifications_url":"https://api.github.com/repos/d-ronin/dRonin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/d-ronin/dRonin/labels{/name}","releases_url":"https://api.github.com/repos/d-ronin/dRonin/releases{/id}","deployments_url":"https://api.github.com/repos/d-ronin/dRonin/deployments","created_at":"2015-10-04T01:13:04Z","updated_at":"2016-08-29T20:49:27Z","pushed_at":"2016-09-09T04:25:28Z","git_url":"git://github.com/d-ronin/dRonin.git","ssh_url":"git@github.com:d-ronin/dRonin.git","clone_url":"https://github.com/d-ronin/dRonin.git","svn_url":"https://github.com/d-ronin/dRonin","homepage":"http://dronin.org","size":252101,"stargazers_count":92,"watchers_count":92,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":167,"forks":63,"open_issues":167,"watchers":92,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324"},"html":{"href":"https://github.com/d-ronin/dRonin/pull/1324"},"issue":{"href":"https://api.github.com/repos/d-ronin/dRonin/issues/1324"},"comments":{"href":"https://api.github.com/repos/d-ronin/dRonin/issues/1324/comments"},"review_comments":{"href":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324/comments"},"review_comment":{"href":"https://api.github.com/repos/d-ronin/dRonin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/d-ronin/dRonin/pulls/1324/commits"},"statuses":{"href":"https://api.github.com/repos/d-ronin/dRonin/statuses/fc3b099a0f01ad0788eee7620f330bc76101a7a3"}}}}
{"actor":{"display_login":"tracernz"}}