{"action":"created","comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/72701710","id":72701710,"diff_hunk":"@@ -64,19 +64,28 @@ class AP_AdvancedFailsafe\n         }\n \n     // check that everything is OK\n-    void check(enum control_mode control_mode, uint32_t last_heartbeat_ms, bool geofence_breached, uint32_t last_valid_rc_ms);\n+    void check(uint32_t last_heartbeat_ms, bool geofence_breached, uint32_t last_valid_rc_ms);\n \n     // generate heartbeat msgs, so external failsafe boards are happy\n     // during sensor calibration\n     void heartbeat(void);\n \n-    // called in servo output code to set servos to crash position if needed\n-    void check_crash_plane(void);\n-\n+    // return true if we are terminating (deliberately crashing the vehicle)\n+    bool should_crash_vehicle(void);\n+    \n     // for holding parameters\n     static const struct AP_Param::GroupInfo var_info[];\n \n-private:\n+    // called to set all outputs to termination state\n+    virtual void terminate_vehicle(void) = 0;\n+        \n+protected:\n+    // setup failsafe values for if FMU firmware stops running\n+    virtual void setup_IO_failsafe(void) = 0;","path":"libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.h","position":53,"original_position":39,"commit_id":"3d7942feca142756c20624efb09bf44932209309","original_commit_id":"b33ead9487e0833ba9e3dcf6044833b108a5dc97","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"body":"I thought so.","created_at":"2016-07-28T20:58:56Z","updated_at":"2016-07-28T20:58:56Z","html_url":"https://github.com/ArduPilot/ardupilot/pull/4546#discussion_r72701710","pull_request_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546","_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/72701710"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/4546#discussion_r72701710"},"pull_request":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546"}}},"pull_request":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546","id":78768914,"html_url":"https://github.com/ArduPilot/ardupilot/pull/4546","diff_url":"https://github.com/ArduPilot/ardupilot/pull/4546.diff","patch_url":"https://github.com/ArduPilot/ardupilot/pull/4546.patch","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4546","number":4546,"state":"open","locked":false,"title":"cleanup advanced failsafe support","user":{"login":"tridge","id":831867,"avatar_url":"https://avatars.githubusercontent.com/u/831867?v=3","gravatar_id":"","url":"https://api.github.com/users/tridge","html_url":"https://github.com/tridge","followers_url":"https://api.github.com/users/tridge/followers","following_url":"https://api.github.com/users/tridge/following{/other_user}","gists_url":"https://api.github.com/users/tridge/gists{/gist_id}","starred_url":"https://api.github.com/users/tridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tridge/subscriptions","organizations_url":"https://api.github.com/users/tridge/orgs","repos_url":"https://api.github.com/users/tridge/repos","events_url":"https://api.github.com/users/tridge/events{/privacy}","received_events_url":"https://api.github.com/users/tridge/received_events","type":"User","site_admin":false},"body":"this is in preparation for adding AFS support to copter.\r\n","created_at":"2016-07-25T23:24:01Z","updated_at":"2016-07-28T20:58:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47a0bbfc49042ec75c0c52a6590ad2ccfa8b5220","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546/commits","review_comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546/comments","review_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4546/comments","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/3d7942feca142756c20624efb09bf44932209309","head":{"label":"tridge:pr-afs-cleanup","ref":"pr-afs-cleanup","sha":"3d7942feca142756c20624efb09bf44932209309","user":{"login":"tridge","id":831867,"avatar_url":"https://avatars.githubusercontent.com/u/831867?v=3","gravatar_id":"","url":"https://api.github.com/users/tridge","html_url":"https://github.com/tridge","followers_url":"https://api.github.com/users/tridge/followers","following_url":"https://api.github.com/users/tridge/following{/other_user}","gists_url":"https://api.github.com/users/tridge/gists{/gist_id}","starred_url":"https://api.github.com/users/tridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tridge/subscriptions","organizations_url":"https://api.github.com/users/tridge/orgs","repos_url":"https://api.github.com/users/tridge/repos","events_url":"https://api.github.com/users/tridge/events{/privacy}","received_events_url":"https://api.github.com/users/tridge/received_events","type":"User","site_admin":false},"repo":{"id":7513848,"name":"ardupilot","full_name":"tridge/ardupilot","owner":{"login":"tridge","id":831867,"avatar_url":"https://avatars.githubusercontent.com/u/831867?v=3","gravatar_id":"","url":"https://api.github.com/users/tridge","html_url":"https://github.com/tridge","followers_url":"https://api.github.com/users/tridge/followers","following_url":"https://api.github.com/users/tridge/following{/other_user}","gists_url":"https://api.github.com/users/tridge/gists{/gist_id}","starred_url":"https://api.github.com/users/tridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tridge/subscriptions","organizations_url":"https://api.github.com/users/tridge/orgs","repos_url":"https://api.github.com/users/tridge/repos","events_url":"https://api.github.com/users/tridge/events{/privacy}","received_events_url":"https://api.github.com/users/tridge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tridge/ardupilot","description":"","fork":true,"url":"https://api.github.com/repos/tridge/ardupilot","forks_url":"https://api.github.com/repos/tridge/ardupilot/forks","keys_url":"https://api.github.com/repos/tridge/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tridge/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tridge/ardupilot/teams","hooks_url":"https://api.github.com/repos/tridge/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/tridge/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/tridge/ardupilot/events","assignees_url":"https://api.github.com/repos/tridge/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/tridge/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/tridge/ardupilot/tags","blobs_url":"https://api.github.com/repos/tridge/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tridge/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tridge/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/tridge/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tridge/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/tridge/ardupilot/languages","stargazers_url":"https://api.github.com/repos/tridge/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/tridge/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/tridge/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/tridge/ardupilot/subscription","commits_url":"https://api.github.com/repos/tridge/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/tridge/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/tridge/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/tridge/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/tridge/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/tridge/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tridge/ardupilot/merges","archive_url":"https://api.github.com/repos/tridge/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tridge/ardupilot/downloads","issues_url":"https://api.github.com/repos/tridge/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/tridge/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/tridge/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/tridge/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tridge/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/tridge/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/tridge/ardupilot/deployments","created_at":"2013-01-09T02:57:15Z","updated_at":"2016-05-27T12:28:44Z","pushed_at":"2016-07-28T06:53:34Z","git_url":"git://github.com/tridge/ardupilot.git","ssh_url":"git@github.com:tridge/ardupilot.git","clone_url":"https://github.com/tridge/ardupilot.git","svn_url":"https://github.com/tridge/ardupilot","homepage":null,"size":116400,"stargazers_count":11,"watchers_count":11,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":11,"default_branch":"master"}},"base":{"label":"ArduPilot:master","ref":"master","sha":"d8b58690ad56ca6cdbbdc075010a21d27e0fffe2","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-07-28T02:35:43Z","pushed_at":"2016-07-28T20:50:24Z","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":140804,"stargazers_count":1991,"watchers_count":1991,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4206,"mirror_url":null,"open_issues_count":805,"forks":4206,"open_issues":805,"watchers":1991,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/4546"},"issue":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4546"},"comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4546/comments"},"review_comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546/comments"},"review_comment":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4546/commits"},"statuses":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/3d7942feca142756c20624efb09bf44932209309"}}}}
{"actor":{"display_login":"lucasdemarchi"}}