{"action":"created","comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/85038510","pull_request_review_id":5777561,"id":85038510,"diff_hunk":"@@ -83,55 +90,59 @@ Compass::start_calibration_mask(uint8_t mask, bool retry, bool autosave, float d\n bool\n Compass::start_calibration_all(bool retry, bool autosave, float delay, bool autoreboot)\n {\n+    _cal_autosave = autosave;\n+    _compass_cal_autoreboot = autoreboot;\n+\n     for (uint8_t i=0; i<COMPASS_MAX_INSTANCES; i++) {\n-        if (healthy(i) && use_for_yaw(i)) {\n-            if (!start_calibration(i,retry,autosave,delay,autoreboot)) {\n-                cancel_calibration_all();\n-                return false;\n-            }\n-        }\n+        // ignore any compasses that fail to start calibrating\n+        // start all should only calibrate compasses that are being used\n+        _start_calibration(i,retry,delay);\n     }\n     return true;","path":"libraries/AP_Compass/AP_Compass_Calibration.cpp","position":84,"original_position":84,"commit_id":"bbde6c2d51341e6fc6b59ef235939d807e53d4f8","original_commit_id":"f32394c8a970a637d4845030d29ed7201957941f","user":{"login":"WickedShell","id":567688,"avatar_url":"https://avatars.githubusercontent.com/u/567688?v=3","gravatar_id":"","url":"https://api.github.com/users/WickedShell","html_url":"https://github.com/WickedShell","followers_url":"https://api.github.com/users/WickedShell/followers","following_url":"https://api.github.com/users/WickedShell/following{/other_user}","gists_url":"https://api.github.com/users/WickedShell/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedShell/subscriptions","organizations_url":"https://api.github.com/users/WickedShell/orgs","repos_url":"https://api.github.com/users/WickedShell/repos","events_url":"https://api.github.com/users/WickedShell/events{/privacy}","received_events_url":"https://api.github.com/users/WickedShell/received_events","type":"User","site_admin":false},"body":"Good point, forgot to change that aspect. I wonder if this should reject the start though to run the check for hal.util->get_soft_armed() here rather then in the mavlink parser. (Compass cal from copter will call the start calibration if motors aren't armed, but that ignores the soft armed state, I'm not clear on the differences between motor arming and soft armed but I wonder if we should be moving the protection)","created_at":"2016-10-26T02:08:27Z","updated_at":"2016-10-26T02:14:34Z","html_url":"https://github.com/ArduPilot/ardupilot/pull/5061#discussion_r85038510","pull_request_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061","_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/85038510"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/5061#discussion_r85038510"},"pull_request":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061"}}},"pull_request":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061","id":90741304,"html_url":"https://github.com/ArduPilot/ardupilot/pull/5061","diff_url":"https://github.com/ArduPilot/ardupilot/pull/5061.diff","patch_url":"https://github.com/ArduPilot/ardupilot/pull/5061.patch","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5061","number":5061,"state":"open","locked":false,"title":"Onboard compass cal rework (Replaces #5037)","user":{"login":"WickedShell","id":567688,"avatar_url":"https://avatars.githubusercontent.com/u/567688?v=3","gravatar_id":"","url":"https://api.github.com/users/WickedShell","html_url":"https://github.com/WickedShell","followers_url":"https://api.github.com/users/WickedShell/followers","following_url":"https://api.github.com/users/WickedShell/following{/other_user}","gists_url":"https://api.github.com/users/WickedShell/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedShell/subscriptions","organizations_url":"https://api.github.com/users/WickedShell/orgs","repos_url":"https://api.github.com/users/WickedShell/repos","events_url":"https://api.github.com/users/WickedShell/events{/privacy}","received_events_url":"https://api.github.com/users/WickedShell/received_events","type":"User","site_admin":false},"body":"This is a replacement for #5037. Incorporates the changes requested from the dev call, but also fixes a number of other small issues.\r\n\r\nFixed issue summary:\r\nAutsave doesn't depend on STREAM_EXTRA3\r\nDon't risk only saving one compass on copter if CAL_ALWAYS_REBOOT is set\r\nOnly calibrate compasses that are both healthy and marked for use (there was a inconsistency in handling the mask)\r\nFix incorrect failure reporting on DO_ACCEPT_MAG_CAL with a mask of 0 if a channel was specifically not started (the most common use case)\r\nFix not starting the buzzer if the delay is set to 0 seconds\r\nAlways send MAG_CAL_REPORT until its acknowledged\r\nCorrect the field in MAG_CAL_REPORT for autosave to indicate if the compass had actually been saved, rather then being scheduled to be saved\r\nRemove unused public interfaces\r\n\r\nRemaining work: Automatically enable STREAM3 if a calibration is requested via mavlink. I still need to test the stick based copter calibration but it *should* work. (Obviously still needs to be tested)","created_at":"2016-10-25T05:25:55Z","updated_at":"2016-10-26T02:14:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deb04c625ad46274fd8a65ce1bf4466ad1c0675f","assignee":{"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},"assignees":[{"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},{"login":"jschall","id":1015761,"avatar_url":"https://avatars.githubusercontent.com/u/1015761?v=3","gravatar_id":"","url":"https://api.github.com/users/jschall","html_url":"https://github.com/jschall","followers_url":"https://api.github.com/users/jschall/followers","following_url":"https://api.github.com/users/jschall/following{/other_user}","gists_url":"https://api.github.com/users/jschall/gists{/gist_id}","starred_url":"https://api.github.com/users/jschall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jschall/subscriptions","organizations_url":"https://api.github.com/users/jschall/orgs","repos_url":"https://api.github.com/users/jschall/repos","events_url":"https://api.github.com/users/jschall/events{/privacy}","received_events_url":"https://api.github.com/users/jschall/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061/commits","review_comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061/comments","review_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5061/comments","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/bbde6c2d51341e6fc6b59ef235939d807e53d4f8","head":{"label":"WickedShell:wickedshell/compass-cal-rewrite-state","ref":"wickedshell/compass-cal-rewrite-state","sha":"bbde6c2d51341e6fc6b59ef235939d807e53d4f8","user":{"login":"WickedShell","id":567688,"avatar_url":"https://avatars.githubusercontent.com/u/567688?v=3","gravatar_id":"","url":"https://api.github.com/users/WickedShell","html_url":"https://github.com/WickedShell","followers_url":"https://api.github.com/users/WickedShell/followers","following_url":"https://api.github.com/users/WickedShell/following{/other_user}","gists_url":"https://api.github.com/users/WickedShell/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedShell/subscriptions","organizations_url":"https://api.github.com/users/WickedShell/orgs","repos_url":"https://api.github.com/users/WickedShell/repos","events_url":"https://api.github.com/users/WickedShell/events{/privacy}","received_events_url":"https://api.github.com/users/WickedShell/received_events","type":"User","site_admin":false},"repo":{"id":33838710,"name":"ardupilot","full_name":"WickedShell/ardupilot","owner":{"login":"WickedShell","id":567688,"avatar_url":"https://avatars.githubusercontent.com/u/567688?v=3","gravatar_id":"","url":"https://api.github.com/users/WickedShell","html_url":"https://github.com/WickedShell","followers_url":"https://api.github.com/users/WickedShell/followers","following_url":"https://api.github.com/users/WickedShell/following{/other_user}","gists_url":"https://api.github.com/users/WickedShell/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedShell/subscriptions","organizations_url":"https://api.github.com/users/WickedShell/orgs","repos_url":"https://api.github.com/users/WickedShell/repos","events_url":"https://api.github.com/users/WickedShell/events{/privacy}","received_events_url":"https://api.github.com/users/WickedShell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WickedShell/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":true,"url":"https://api.github.com/repos/WickedShell/ardupilot","forks_url":"https://api.github.com/repos/WickedShell/ardupilot/forks","keys_url":"https://api.github.com/repos/WickedShell/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WickedShell/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WickedShell/ardupilot/teams","hooks_url":"https://api.github.com/repos/WickedShell/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/WickedShell/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/WickedShell/ardupilot/events","assignees_url":"https://api.github.com/repos/WickedShell/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/WickedShell/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/WickedShell/ardupilot/tags","blobs_url":"https://api.github.com/repos/WickedShell/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WickedShell/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WickedShell/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/WickedShell/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WickedShell/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/WickedShell/ardupilot/languages","stargazers_url":"https://api.github.com/repos/WickedShell/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/WickedShell/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/WickedShell/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/WickedShell/ardupilot/subscription","commits_url":"https://api.github.com/repos/WickedShell/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/WickedShell/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/WickedShell/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/WickedShell/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/WickedShell/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/WickedShell/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WickedShell/ardupilot/merges","archive_url":"https://api.github.com/repos/WickedShell/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WickedShell/ardupilot/downloads","issues_url":"https://api.github.com/repos/WickedShell/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/WickedShell/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/WickedShell/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/WickedShell/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WickedShell/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/WickedShell/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/WickedShell/ardupilot/deployments","created_at":"2015-04-12T23:49:21Z","updated_at":"2016-04-12T00:04:36Z","pushed_at":"2016-10-25T05:21:42Z","git_url":"git://github.com/WickedShell/ardupilot.git","ssh_url":"git@github.com:WickedShell/ardupilot.git","clone_url":"https://github.com/WickedShell/ardupilot.git","svn_url":"https://github.com/WickedShell/ardupilot","homepage":"http://ardupilot.com/","size":76772,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"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":"master"}},"base":{"label":"ArduPilot:master","ref":"master","sha":"e88995385a01472eea0ca7abda3c611261d89542","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-10-26T01:46:18Z","pushed_at":"2016-10-26T02:03:11Z","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":146737,"stargazers_count":2141,"watchers_count":2141,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4540,"mirror_url":null,"open_issues_count":842,"forks":4540,"open_issues":842,"watchers":2141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/5061"},"issue":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5061"},"comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5061/comments"},"review_comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061/comments"},"review_comment":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/5061/commits"},"statuses":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/bbde6c2d51341e6fc6b59ef235939d807e53d4f8"}}}}
{"actor":{"display_login":"WickedShell"}}