{"action":"created","comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/80539522","id":80539522,"diff_hunk":"@@ -127,7 +127,7 @@ class AP_Frsky_Telem\n     void update_control_mode(uint8_t mode) { _ap.control_mode = mode; }\n \n     // update whether we're flying (used for Plane)\n-    void set_is_flying(bool is_flying) { *_ap.value == is_flying ? (*_ap.value | AP_ISFLYING_FLAG) : (*_ap.value & (~AP_ISFLYING_FLAG)); }\n+    void set_is_flying(bool is_flying) { _ap.value == is_flying ? (_ap.value | AP_ISFLYING_FLAG) : (_ap.value & (~AP_ISFLYING_FLAG)); }","path":"libraries/AP_Frsky_Telem/AP_Frsky_Telem.h","position":14,"original_position":14,"commit_id":"5e022bf631e8162cd7bbd566762b2343a51c64b8","original_commit_id":"5e022bf631e8162cd7bbd566762b2343a51c64b8","user":{"login":"OXINARF","id":1778527,"avatar_url":"https://avatars.githubusercontent.com/u/1778527?v=3","gravatar_id":"","url":"https://api.github.com/users/OXINARF","html_url":"https://github.com/OXINARF","followers_url":"https://api.github.com/users/OXINARF/followers","following_url":"https://api.github.com/users/OXINARF/following{/other_user}","gists_url":"https://api.github.com/users/OXINARF/gists{/gist_id}","starred_url":"https://api.github.com/users/OXINARF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OXINARF/subscriptions","organizations_url":"https://api.github.com/users/OXINARF/orgs","repos_url":"https://api.github.com/users/OXINARF/repos","events_url":"https://api.github.com/users/OXINARF/events{/privacy}","received_events_url":"https://api.github.com/users/OXINARF/received_events","type":"User","site_admin":false},"body":"Then the method would have no use, because it is only used for Plane and Plane doesn't construct the library with an ap.value pointer. Although this is a mess, I think other ways would be even worse.\r\n\r\nBut that `_ap.value == is_flying` looks wrong, it should just be `is_flying`.","created_at":"2016-09-26T18:22:18Z","updated_at":"2016-09-26T18:22:18Z","html_url":"https://github.com/ArduPilot/ardupilot/pull/4892#discussion_r80539522","pull_request_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892","_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/80539522"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/4892#discussion_r80539522"},"pull_request":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892"}}},"pull_request":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892","id":86786560,"html_url":"https://github.com/ArduPilot/ardupilot/pull/4892","diff_url":"https://github.com/ArduPilot/ardupilot/pull/4892.diff","patch_url":"https://github.com/ArduPilot/ardupilot/pull/4892.patch","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4892","number":4892,"state":"open","locked":false,"title":"AP_Frsky_Telem: fix *_ap.value issue for Plane","user":{"login":"floaledm","id":9093438,"avatar_url":"https://avatars.githubusercontent.com/u/9093438?v=3","gravatar_id":"","url":"https://api.github.com/users/floaledm","html_url":"https://github.com/floaledm","followers_url":"https://api.github.com/users/floaledm/followers","following_url":"https://api.github.com/users/floaledm/following{/other_user}","gists_url":"https://api.github.com/users/floaledm/gists{/gist_id}","starred_url":"https://api.github.com/users/floaledm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floaledm/subscriptions","organizations_url":"https://api.github.com/users/floaledm/orgs","repos_url":"https://api.github.com/users/floaledm/repos","events_url":"https://api.github.com/users/floaledm/events{/privacy}","received_events_url":"https://api.github.com/users/floaledm/received_events","type":"User","site_admin":false},"body":"This is a followup on #4879\r\nCurrently, set_is_flying does operations on a nullptr and the corresponding ap_status flag does not update for Plane (since _ap.value is a nullptr in Plane)\r\nProbably cleaner too since with this PR _ap.valuep would never be a nullptr, hence there would be no need to check whether it is a nullptr...","created_at":"2016-09-26T17:42:12Z","updated_at":"2016-09-26T18:22:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bba11b47b0fc7ed378897d4868d6a2477fafefd2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892/commits","review_comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892/comments","review_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4892/comments","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/5e022bf631e8162cd7bbd566762b2343a51c64b8","head":{"label":"craftandtheory:ap_value_fix","ref":"ap_value_fix","sha":"5e022bf631e8162cd7bbd566762b2343a51c64b8","user":{"login":"craftandtheory","id":15683230,"avatar_url":"https://avatars.githubusercontent.com/u/15683230?v=3","gravatar_id":"","url":"https://api.github.com/users/craftandtheory","html_url":"https://github.com/craftandtheory","followers_url":"https://api.github.com/users/craftandtheory/followers","following_url":"https://api.github.com/users/craftandtheory/following{/other_user}","gists_url":"https://api.github.com/users/craftandtheory/gists{/gist_id}","starred_url":"https://api.github.com/users/craftandtheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craftandtheory/subscriptions","organizations_url":"https://api.github.com/users/craftandtheory/orgs","repos_url":"https://api.github.com/users/craftandtheory/repos","events_url":"https://api.github.com/users/craftandtheory/events{/privacy}","received_events_url":"https://api.github.com/users/craftandtheory/received_events","type":"Organization","site_admin":false},"repo":{"id":46198178,"name":"ardupilot","full_name":"craftandtheory/ardupilot","owner":{"login":"craftandtheory","id":15683230,"avatar_url":"https://avatars.githubusercontent.com/u/15683230?v=3","gravatar_id":"","url":"https://api.github.com/users/craftandtheory","html_url":"https://github.com/craftandtheory","followers_url":"https://api.github.com/users/craftandtheory/followers","following_url":"https://api.github.com/users/craftandtheory/following{/other_user}","gists_url":"https://api.github.com/users/craftandtheory/gists{/gist_id}","starred_url":"https://api.github.com/users/craftandtheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craftandtheory/subscriptions","organizations_url":"https://api.github.com/users/craftandtheory/orgs","repos_url":"https://api.github.com/users/craftandtheory/repos","events_url":"https://api.github.com/users/craftandtheory/events{/privacy}","received_events_url":"https://api.github.com/users/craftandtheory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/craftandtheory/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":true,"url":"https://api.github.com/repos/craftandtheory/ardupilot","forks_url":"https://api.github.com/repos/craftandtheory/ardupilot/forks","keys_url":"https://api.github.com/repos/craftandtheory/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/craftandtheory/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/craftandtheory/ardupilot/teams","hooks_url":"https://api.github.com/repos/craftandtheory/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/craftandtheory/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/craftandtheory/ardupilot/events","assignees_url":"https://api.github.com/repos/craftandtheory/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/craftandtheory/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/craftandtheory/ardupilot/tags","blobs_url":"https://api.github.com/repos/craftandtheory/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/craftandtheory/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/craftandtheory/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/craftandtheory/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/craftandtheory/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/craftandtheory/ardupilot/languages","stargazers_url":"https://api.github.com/repos/craftandtheory/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/craftandtheory/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/craftandtheory/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/craftandtheory/ardupilot/subscription","commits_url":"https://api.github.com/repos/craftandtheory/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/craftandtheory/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/craftandtheory/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/craftandtheory/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/craftandtheory/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/craftandtheory/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/craftandtheory/ardupilot/merges","archive_url":"https://api.github.com/repos/craftandtheory/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/craftandtheory/ardupilot/downloads","issues_url":"https://api.github.com/repos/craftandtheory/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/craftandtheory/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/craftandtheory/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/craftandtheory/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/craftandtheory/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/craftandtheory/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/craftandtheory/ardupilot/deployments","created_at":"2015-11-15T00:38:05Z","updated_at":"2016-01-14T12:41:17Z","pushed_at":"2016-09-26T17:36:14Z","git_url":"git://github.com/craftandtheory/ardupilot.git","ssh_url":"git@github.com:craftandtheory/ardupilot.git","clone_url":"https://github.com/craftandtheory/ardupilot.git","svn_url":"https://github.com/craftandtheory/ardupilot","homepage":"http://ardupilot.com/","size":76941,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"ArduPilot:master","ref":"master","sha":"620cd063471f192b1201954759bfd6a248876838","user":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars.githubusercontent.com/u/17919847?v=3","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"ArduPilot/ardupilot","owner":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars.githubusercontent.com/u/17919847?v=3","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArduPilot/ardupilot","description":"ArduPlane, ArduCopter, ArduRover source","fork":false,"url":"https://api.github.com/repos/ArduPilot/ardupilot","forks_url":"https://api.github.com/repos/ArduPilot/ardupilot/forks","keys_url":"https://api.github.com/repos/ArduPilot/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArduPilot/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArduPilot/ardupilot/teams","hooks_url":"https://api.github.com/repos/ArduPilot/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/ArduPilot/ardupilot/events","assignees_url":"https://api.github.com/repos/ArduPilot/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/ArduPilot/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/tags","blobs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/ArduPilot/ardupilot/languages","stargazers_url":"https://api.github.com/repos/ArduPilot/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/ArduPilot/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscription","commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArduPilot/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/ArduPilot/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArduPilot/ardupilot/merges","archive_url":"https://api.github.com/repos/ArduPilot/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArduPilot/ardupilot/downloads","issues_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/ArduPilot/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/ArduPilot/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArduPilot/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/ArduPilot/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/ArduPilot/ardupilot/deployments","created_at":"2013-01-09T00:58:52Z","updated_at":"2016-09-26T15:04:57Z","pushed_at":"2016-09-26T17:42:13Z","git_url":"git://github.com/ArduPilot/ardupilot.git","ssh_url":"git@github.com:ArduPilot/ardupilot.git","clone_url":"https://github.com/ArduPilot/ardupilot.git","svn_url":"https://github.com/ArduPilot/ardupilot","homepage":"http://ardupilot.org/","size":143210,"stargazers_count":2099,"watchers_count":2099,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4439,"mirror_url":null,"open_issues_count":833,"forks":4439,"open_issues":833,"watchers":2099,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/4892"},"issue":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4892"},"comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4892/comments"},"review_comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892/comments"},"review_comment":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4892/commits"},"statuses":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/5e022bf631e8162cd7bbd566762b2343a51c64b8"}}}}
{"actor":{"display_login":"OXINARF"}}