{"action":"created","comment":{"url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments/43585092","id":43585092,"diff_hunk":"@@ -333,42 +333,50 @@ static void _msp_send_altitude(struct msp_bridge *m)\n \tmsp_send(m, MSP_ALTITUDE, data.buf, sizeof(data));\n }\n \n+static uint16_t _msp_scale_rc(ActuatorSettingsData actuatorSettings,\n+\t\t\t      ManualControlCommandData manualState,\n+\t\t\t      int channel_num)\n+{\n+\tuint16_t val = manualState.Channel[channel_num];\n+\tuint16_t min = actuatorSettings.ChannelMin[channel_num];\n+\tuint16_t max = actuatorSettings.ChannelMax[channel_num];\n+\tuint16_t idle = actuatorSettings.ChannelNeutral[channel_num];\n+\n+\t// Min and max may be reversed.  If the value is outside of\n+\t// the given range, return the neutral value.\n+\tuint16_t lower = min < max ? min : max;\n+\tuint16_t higher = max > min ? max : min;","path":"flight/Modules/UAVOMSPBridge/UAVOMSPBridge.c","position":34,"original_position":34,"commit_id":"2628057b9573b5991156e8ebf2d6163984fa4093","original_commit_id":"2628057b9573b5991156e8ebf2d6163984fa4093","user":{"login":"dustin","id":1779,"avatar_url":"https://avatars.githubusercontent.com/u/1779?v=3","gravatar_id":"","url":"https://api.github.com/users/dustin","html_url":"https://github.com/dustin","followers_url":"https://api.github.com/users/dustin/followers","following_url":"https://api.github.com/users/dustin/following{/other_user}","gists_url":"https://api.github.com/users/dustin/gists{/gist_id}","starred_url":"https://api.github.com/users/dustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustin/subscriptions","organizations_url":"https://api.github.com/users/dustin/orgs","repos_url":"https://api.github.com/users/dustin/repos","events_url":"https://api.github.com/users/dustin/events{/privacy}","received_events_url":"https://api.github.com/users/dustin/received_events","type":"User","site_admin":false},"body":"Thanks, did that.","created_at":"2015-11-01T17:43:15Z","updated_at":"2015-11-01T17:43:15Z","html_url":"https://github.com/TauLabs/TauLabs/pull/2033#discussion_r43585092","pull_request_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033","_links":{"self":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments/43585092"},"html":{"href":"https://github.com/TauLabs/TauLabs/pull/2033#discussion_r43585092"},"pull_request":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033"}}},"pull_request":{"url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033","id":49346347,"html_url":"https://github.com/TauLabs/TauLabs/pull/2033","diff_url":"https://github.com/TauLabs/TauLabs/pull/2033.diff","patch_url":"https://github.com/TauLabs/TauLabs/pull/2033.patch","issue_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/2033","number":2033,"state":"open","locked":false,"title":"MSP Updates: current, heading, and stick normalization","user":{"login":"dustin","id":1779,"avatar_url":"https://avatars.githubusercontent.com/u/1779?v=3","gravatar_id":"","url":"https://api.github.com/users/dustin","html_url":"https://github.com/dustin","followers_url":"https://api.github.com/users/dustin/followers","following_url":"https://api.github.com/users/dustin/following{/other_user}","gists_url":"https://api.github.com/users/dustin/gists{/gist_id}","starred_url":"https://api.github.com/users/dustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustin/subscriptions","organizations_url":"https://api.github.com/users/dustin/orgs","repos_url":"https://api.github.com/users/dustin/repos","events_url":"https://api.github.com/users/dustin/events{/privacy}","received_events_url":"https://api.github.com/users/dustin/received_events","type":"User","site_admin":false},"body":"Noticed this having built an aircraft around it.","created_at":"2015-10-31T10:10:37Z","updated_at":"2015-11-01T17:43:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"105be38c8f6cd4b8f14305e5eed3ebc260cc384b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033/commits","review_comments_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033/comments","review_comment_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/2033/comments","statuses_url":"https://api.github.com/repos/TauLabs/TauLabs/statuses/2628057b9573b5991156e8ebf2d6163984fa4093","head":{"label":"dustin:msp","ref":"msp","sha":"2628057b9573b5991156e8ebf2d6163984fa4093","user":{"login":"dustin","id":1779,"avatar_url":"https://avatars.githubusercontent.com/u/1779?v=3","gravatar_id":"","url":"https://api.github.com/users/dustin","html_url":"https://github.com/dustin","followers_url":"https://api.github.com/users/dustin/followers","following_url":"https://api.github.com/users/dustin/following{/other_user}","gists_url":"https://api.github.com/users/dustin/gists{/gist_id}","starred_url":"https://api.github.com/users/dustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustin/subscriptions","organizations_url":"https://api.github.com/users/dustin/orgs","repos_url":"https://api.github.com/users/dustin/repos","events_url":"https://api.github.com/users/dustin/events{/privacy}","received_events_url":"https://api.github.com/users/dustin/received_events","type":"User","site_admin":false},"repo":{"id":44721058,"name":"TauLabs","full_name":"dustin/TauLabs","owner":{"login":"dustin","id":1779,"avatar_url":"https://avatars.githubusercontent.com/u/1779?v=3","gravatar_id":"","url":"https://api.github.com/users/dustin","html_url":"https://github.com/dustin","followers_url":"https://api.github.com/users/dustin/followers","following_url":"https://api.github.com/users/dustin/following{/other_user}","gists_url":"https://api.github.com/users/dustin/gists{/gist_id}","starred_url":"https://api.github.com/users/dustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustin/subscriptions","organizations_url":"https://api.github.com/users/dustin/orgs","repos_url":"https://api.github.com/users/dustin/repos","events_url":"https://api.github.com/users/dustin/events{/privacy}","received_events_url":"https://api.github.com/users/dustin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dustin/TauLabs","description":"","fork":true,"url":"https://api.github.com/repos/dustin/TauLabs","forks_url":"https://api.github.com/repos/dustin/TauLabs/forks","keys_url":"https://api.github.com/repos/dustin/TauLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dustin/TauLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dustin/TauLabs/teams","hooks_url":"https://api.github.com/repos/dustin/TauLabs/hooks","issue_events_url":"https://api.github.com/repos/dustin/TauLabs/issues/events{/number}","events_url":"https://api.github.com/repos/dustin/TauLabs/events","assignees_url":"https://api.github.com/repos/dustin/TauLabs/assignees{/user}","branches_url":"https://api.github.com/repos/dustin/TauLabs/branches{/branch}","tags_url":"https://api.github.com/repos/dustin/TauLabs/tags","blobs_url":"https://api.github.com/repos/dustin/TauLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dustin/TauLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dustin/TauLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/dustin/TauLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dustin/TauLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/dustin/TauLabs/languages","stargazers_url":"https://api.github.com/repos/dustin/TauLabs/stargazers","contributors_url":"https://api.github.com/repos/dustin/TauLabs/contributors","subscribers_url":"https://api.github.com/repos/dustin/TauLabs/subscribers","subscription_url":"https://api.github.com/repos/dustin/TauLabs/subscription","commits_url":"https://api.github.com/repos/dustin/TauLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/dustin/TauLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/dustin/TauLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/dustin/TauLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/dustin/TauLabs/contents/{+path}","compare_url":"https://api.github.com/repos/dustin/TauLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dustin/TauLabs/merges","archive_url":"https://api.github.com/repos/dustin/TauLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dustin/TauLabs/downloads","issues_url":"https://api.github.com/repos/dustin/TauLabs/issues{/number}","pulls_url":"https://api.github.com/repos/dustin/TauLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/dustin/TauLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/dustin/TauLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dustin/TauLabs/labels{/name}","releases_url":"https://api.github.com/repos/dustin/TauLabs/releases{/id}","created_at":"2015-10-22T03:57:35Z","updated_at":"2015-10-22T03:58:10Z","pushed_at":"2015-11-01T07:09:40Z","git_url":"git://github.com/dustin/TauLabs.git","ssh_url":"git@github.com:dustin/TauLabs.git","clone_url":"https://github.com/dustin/TauLabs.git","svn_url":"https://github.com/dustin/TauLabs","homepage":"taulabs.org","size":209744,"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":"next"}},"base":{"label":"TauLabs:next","ref":"next","sha":"cff95385437dadbbc71bd5d7eed0fca4c0e3c966","user":{"login":"TauLabs","id":3201381,"avatar_url":"https://avatars.githubusercontent.com/u/3201381?v=3","gravatar_id":"","url":"https://api.github.com/users/TauLabs","html_url":"https://github.com/TauLabs","followers_url":"https://api.github.com/users/TauLabs/followers","following_url":"https://api.github.com/users/TauLabs/following{/other_user}","gists_url":"https://api.github.com/users/TauLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/TauLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TauLabs/subscriptions","organizations_url":"https://api.github.com/users/TauLabs/orgs","repos_url":"https://api.github.com/users/TauLabs/repos","events_url":"https://api.github.com/users/TauLabs/events{/privacy}","received_events_url":"https://api.github.com/users/TauLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":6589168,"name":"TauLabs","full_name":"TauLabs/TauLabs","owner":{"login":"TauLabs","id":3201381,"avatar_url":"https://avatars.githubusercontent.com/u/3201381?v=3","gravatar_id":"","url":"https://api.github.com/users/TauLabs","html_url":"https://github.com/TauLabs","followers_url":"https://api.github.com/users/TauLabs/followers","following_url":"https://api.github.com/users/TauLabs/following{/other_user}","gists_url":"https://api.github.com/users/TauLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/TauLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TauLabs/subscriptions","organizations_url":"https://api.github.com/users/TauLabs/orgs","repos_url":"https://api.github.com/users/TauLabs/repos","events_url":"https://api.github.com/users/TauLabs/events{/privacy}","received_events_url":"https://api.github.com/users/TauLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TauLabs/TauLabs","description":"","fork":false,"url":"https://api.github.com/repos/TauLabs/TauLabs","forks_url":"https://api.github.com/repos/TauLabs/TauLabs/forks","keys_url":"https://api.github.com/repos/TauLabs/TauLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TauLabs/TauLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TauLabs/TauLabs/teams","hooks_url":"https://api.github.com/repos/TauLabs/TauLabs/hooks","issue_events_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/events{/number}","events_url":"https://api.github.com/repos/TauLabs/TauLabs/events","assignees_url":"https://api.github.com/repos/TauLabs/TauLabs/assignees{/user}","branches_url":"https://api.github.com/repos/TauLabs/TauLabs/branches{/branch}","tags_url":"https://api.github.com/repos/TauLabs/TauLabs/tags","blobs_url":"https://api.github.com/repos/TauLabs/TauLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TauLabs/TauLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TauLabs/TauLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/TauLabs/TauLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TauLabs/TauLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/TauLabs/TauLabs/languages","stargazers_url":"https://api.github.com/repos/TauLabs/TauLabs/stargazers","contributors_url":"https://api.github.com/repos/TauLabs/TauLabs/contributors","subscribers_url":"https://api.github.com/repos/TauLabs/TauLabs/subscribers","subscription_url":"https://api.github.com/repos/TauLabs/TauLabs/subscription","commits_url":"https://api.github.com/repos/TauLabs/TauLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/TauLabs/TauLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/TauLabs/TauLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/TauLabs/TauLabs/contents/{+path}","compare_url":"https://api.github.com/repos/TauLabs/TauLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TauLabs/TauLabs/merges","archive_url":"https://api.github.com/repos/TauLabs/TauLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TauLabs/TauLabs/downloads","issues_url":"https://api.github.com/repos/TauLabs/TauLabs/issues{/number}","pulls_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/TauLabs/TauLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/TauLabs/TauLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TauLabs/TauLabs/labels{/name}","releases_url":"https://api.github.com/repos/TauLabs/TauLabs/releases{/id}","created_at":"2012-11-08T01:01:18Z","updated_at":"2015-11-01T04:13:33Z","pushed_at":"2015-11-01T07:09:41Z","git_url":"git://github.com/TauLabs/TauLabs.git","ssh_url":"git@github.com:TauLabs/TauLabs.git","clone_url":"https://github.com/TauLabs/TauLabs.git","svn_url":"https://github.com/TauLabs/TauLabs","homepage":"taulabs.org","size":333963,"stargazers_count":286,"watchers_count":286,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":326,"mirror_url":null,"open_issues_count":278,"forks":326,"open_issues":278,"watchers":286,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033"},"html":{"href":"https://github.com/TauLabs/TauLabs/pull/2033"},"issue":{"href":"https://api.github.com/repos/TauLabs/TauLabs/issues/2033"},"comments":{"href":"https://api.github.com/repos/TauLabs/TauLabs/issues/2033/comments"},"review_comments":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033/comments"},"review_comment":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2033/commits"},"statuses":{"href":"https://api.github.com/repos/TauLabs/TauLabs/statuses/2628057b9573b5991156e8ebf2d6163984fa4093"}}}}