{"action":"closed","number":9436,"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/9436","id":186492120,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2NDkyMTIw","html_url":"https://github.com/PX4/Firmware/pull/9436","diff_url":"https://github.com/PX4/Firmware/pull/9436.diff","patch_url":"https://github.com/PX4/Firmware/pull/9436.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/9436","number":9436,"state":"closed","locked":false,"title":"Fill system health flags in commander for automated checklists","user":{"login":"philipoe","id":2565608,"node_id":"MDQ6VXNlcjI1NjU2MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/2565608?v=4","gravatar_id":"","url":"https://api.github.com/users/philipoe","html_url":"https://github.com/philipoe","followers_url":"https://api.github.com/users/philipoe/followers","following_url":"https://api.github.com/users/philipoe/following{/other_user}","gists_url":"https://api.github.com/users/philipoe/gists{/gist_id}","starred_url":"https://api.github.com/users/philipoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipoe/subscriptions","organizations_url":"https://api.github.com/users/philipoe/orgs","repos_url":"https://api.github.com/users/philipoe/repos","events_url":"https://api.github.com/users/philipoe/events{/privacy}","received_events_url":"https://api.github.com/users/philipoe/received_events","type":"User","site_admin":false},"body":"### What this is about\r\n\r\nThis PR fills many of the [sensor/system health flags](https://mavlink.io/en/messages/common.html#MAV_SYS_STATUS_SENSOR) of the MAVLINK [SYS_STATUS message](https://mavlink.io/en/messages/common.html#SYS_STATUS). Therefore, this PR implements the functionality that allows proper system health evaluation in ground stations. It thereby also enables automated checklists, and is thus the counterpart to the QGroundControl automated checklist PR at https://github.com/mavlink/qgroundcontrol/pull/6364.\r\n\r\n### Notes on implementation\r\n\r\n- This heavily cleans up the previous `subsystem_info` publishing code and centralizes this more towards `commander`/`preflightCheck` and the `voted_sensors_update.cpp` files. Some drivers (optical flow, distance sensor) still publish their own subsystem_info, which is why the interface functions in `src/modules/systemlib/subsystem_info_pub.cpp` are required. If at any point the decision that _each and every sensor or capability_ can be checked entirely inside commander/preflight check is taken, then these interface functions can be removed.\r\n- The convention of the health flags in the MAVLINK [SYS_STATUS message](https://mavlink.io/en/messages/common.html#SYS_STATUS) was a bit confusing at first, but with @dagar we discussed that \"enabled\"=the user actually wants the sensor to work and thus the sensor should deliver valid data, \"present\"=the sensor is installed (i.e. has responded in _some initial form_ to a request, but it may deliver invalid data), \"health\" = the sensor actually delivers valid data (which requires that the sensor is present). This is also how QGC seems to define this. The question whether the user has enabled a sensor is inferred mostly from the parameters that the user set.\r\n\r\n### Testing status\r\nTested extensively in the lab for various missing, failing or uncalibrated sensors or systems (Mag, Gyro, Accel, Baro, DiffPressure, RC Transmitter, GPS, Global Position Estimate aka EKF2 validity checks). A previous version (based on an older master) was already used during some fixed-wing test flights.\r\n\r\n### Next (related) steps\r\n - Submit a Mavlink PR that adds the SUBSYSTEM_TYPE_MISSION health flag in mavlink, too.\r\n - Get the QGC PR (mavlink/qgroundcontrol#6364) merged.\r\n\r\n@dagar This is the PR that we have been discussing for a while rebased on the current master.","created_at":"2018-05-07T23:38:19Z","updated_at":"2018-06-06T16:54:25Z","closed_at":"2018-06-06T16:54:25Z","merged_at":"2018-06-06T16:54:25Z","merge_commit_sha":"9f414e82f64bbaba28ba4b7d764c488758cb84a2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":10884840,"node_id":"MDU6TGFiZWwxMDg4NDg0MA==","url":"https://api.github.com/repos/PX4/Firmware/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":{"url":"https://api.github.com/repos/PX4/Firmware/milestones/25","html_url":"https://github.com/PX4/Firmware/milestone/25","labels_url":"https://api.github.com/repos/PX4/Firmware/milestones/25/labels","id":2491597,"node_id":"MDk6TWlsZXN0b25lMjQ5MTU5Nw==","number":25,"title":"Release v2.0.0","description":"","creator":{"login":"LorenzMeier","id":1208119,"node_id":"MDQ6VXNlcjEyMDgxMTk=","avatar_url":"https://avatars3.githubusercontent.com/u/1208119?v=4","gravatar_id":"","url":"https://api.github.com/users/LorenzMeier","html_url":"https://github.com/LorenzMeier","followers_url":"https://api.github.com/users/LorenzMeier/followers","following_url":"https://api.github.com/users/LorenzMeier/following{/other_user}","gists_url":"https://api.github.com/users/LorenzMeier/gists{/gist_id}","starred_url":"https://api.github.com/users/LorenzMeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorenzMeier/subscriptions","organizations_url":"https://api.github.com/users/LorenzMeier/orgs","repos_url":"https://api.github.com/users/LorenzMeier/repos","events_url":"https://api.github.com/users/LorenzMeier/events{/privacy}","received_events_url":"https://api.github.com/users/LorenzMeier/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":9,"state":"open","created_at":"2017-05-01T13:31:10Z","updated_at":"2018-06-06T16:54:25Z","due_on":"2018-08-15T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/9436/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/9436/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/9436/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/0ad268c2a5a8499e61e99f76079f45c2ca01786d","head":{"label":"philipoe:checklistPR","ref":"checklistPR","sha":"0ad268c2a5a8499e61e99f76079f45c2ca01786d","user":{"login":"philipoe","id":2565608,"node_id":"MDQ6VXNlcjI1NjU2MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/2565608?v=4","gravatar_id":"","url":"https://api.github.com/users/philipoe","html_url":"https://github.com/philipoe","followers_url":"https://api.github.com/users/philipoe/followers","following_url":"https://api.github.com/users/philipoe/following{/other_user}","gists_url":"https://api.github.com/users/philipoe/gists{/gist_id}","starred_url":"https://api.github.com/users/philipoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipoe/subscriptions","organizations_url":"https://api.github.com/users/philipoe/orgs","repos_url":"https://api.github.com/users/philipoe/repos","events_url":"https://api.github.com/users/philipoe/events{/privacy}","received_events_url":"https://api.github.com/users/philipoe/received_events","type":"User","site_admin":false},"repo":{"id":25470237,"node_id":"MDEwOlJlcG9zaXRvcnkyNTQ3MDIzNw==","name":"Firmware","full_name":"philipoe/Firmware","owner":{"login":"philipoe","id":2565608,"node_id":"MDQ6VXNlcjI1NjU2MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/2565608?v=4","gravatar_id":"","url":"https://api.github.com/users/philipoe","html_url":"https://github.com/philipoe","followers_url":"https://api.github.com/users/philipoe/followers","following_url":"https://api.github.com/users/philipoe/following{/other_user}","gists_url":"https://api.github.com/users/philipoe/gists{/gist_id}","starred_url":"https://api.github.com/users/philipoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipoe/subscriptions","organizations_url":"https://api.github.com/users/philipoe/orgs","repos_url":"https://api.github.com/users/philipoe/repos","events_url":"https://api.github.com/users/philipoe/events{/privacy}","received_events_url":"https://api.github.com/users/philipoe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philipoe/Firmware","description":"PX4 Firmware for PX4FMU autopilot and PX4IO servo / failsafe board","fork":true,"url":"https://api.github.com/repos/philipoe/Firmware","forks_url":"https://api.github.com/repos/philipoe/Firmware/forks","keys_url":"https://api.github.com/repos/philipoe/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philipoe/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philipoe/Firmware/teams","hooks_url":"https://api.github.com/repos/philipoe/Firmware/hooks","issue_events_url":"https://api.github.com/repos/philipoe/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/philipoe/Firmware/events","assignees_url":"https://api.github.com/repos/philipoe/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/philipoe/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/philipoe/Firmware/tags","blobs_url":"https://api.github.com/repos/philipoe/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philipoe/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philipoe/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/philipoe/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philipoe/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/philipoe/Firmware/languages","stargazers_url":"https://api.github.com/repos/philipoe/Firmware/stargazers","contributors_url":"https://api.github.com/repos/philipoe/Firmware/contributors","subscribers_url":"https://api.github.com/repos/philipoe/Firmware/subscribers","subscription_url":"https://api.github.com/repos/philipoe/Firmware/subscription","commits_url":"https://api.github.com/repos/philipoe/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/philipoe/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/philipoe/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/philipoe/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/philipoe/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/philipoe/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philipoe/Firmware/merges","archive_url":"https://api.github.com/repos/philipoe/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philipoe/Firmware/downloads","issues_url":"https://api.github.com/repos/philipoe/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/philipoe/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/philipoe/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/philipoe/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philipoe/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/philipoe/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/philipoe/Firmware/deployments","created_at":"2014-10-20T14:29:49Z","updated_at":"2014-11-23T20:23:41Z","pushed_at":"2018-06-06T12:24:31Z","git_url":"git://github.com/philipoe/Firmware.git","ssh_url":"git@github.com:philipoe/Firmware.git","clone_url":"https://github.com/philipoe/Firmware.git","svn_url":"https://github.com/philipoe/Firmware","homepage":"https://pixhawk.ethz.ch/px4/","size":96681,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"1ee08da9c4182f7e30c2b39462bdead069c9c588","user":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"repo":{"id":5298790,"node_id":"MDEwOlJlcG9zaXRvcnk1Mjk4Nzkw","name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PX4/Firmware","description":"PX4 Pro Autopilot Software","fork":false,"url":"https://api.github.com/repos/PX4/Firmware","forks_url":"https://api.github.com/repos/PX4/Firmware/forks","keys_url":"https://api.github.com/repos/PX4/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/Firmware/teams","hooks_url":"https://api.github.com/repos/PX4/Firmware/hooks","issue_events_url":"https://api.github.com/repos/PX4/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/Firmware/events","assignees_url":"https://api.github.com/repos/PX4/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/Firmware/tags","blobs_url":"https://api.github.com/repos/PX4/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/Firmware/languages","stargazers_url":"https://api.github.com/repos/PX4/Firmware/stargazers","contributors_url":"https://api.github.com/repos/PX4/Firmware/contributors","subscribers_url":"https://api.github.com/repos/PX4/Firmware/subscribers","subscription_url":"https://api.github.com/repos/PX4/Firmware/subscription","commits_url":"https://api.github.com/repos/PX4/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/Firmware/merges","archive_url":"https://api.github.com/repos/PX4/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/Firmware/downloads","issues_url":"https://api.github.com/repos/PX4/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/PX4/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/Firmware/deployments","created_at":"2012-08-04T21:19:36Z","updated_at":"2018-06-06T15:32:08Z","pushed_at":"2018-06-06T16:54:25Z","git_url":"git://github.com/PX4/Firmware.git","ssh_url":"git@github.com:PX4/Firmware.git","clone_url":"https://github.com/PX4/Firmware.git","svn_url":"https://github.com/PX4/Firmware","homepage":"http://px4.io","size":99700,"stargazers_count":1751,"watchers_count":1751,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5128,"mirror_url":null,"archived":false,"open_issues_count":447,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":5128,"open_issues":447,"watchers":1751,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9436"},"html":{"href":"https://github.com/PX4/Firmware/pull/9436"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9436"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9436/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9436/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9436/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/0ad268c2a5a8499e61e99f76079f45c2ca01786d"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"bkueng","id":281593,"node_id":"MDQ6VXNlcjI4MTU5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/281593?v=4","gravatar_id":"","url":"https://api.github.com/users/bkueng","html_url":"https://github.com/bkueng","followers_url":"https://api.github.com/users/bkueng/followers","following_url":"https://api.github.com/users/bkueng/following{/other_user}","gists_url":"https://api.github.com/users/bkueng/gists{/gist_id}","starred_url":"https://api.github.com/users/bkueng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkueng/subscriptions","organizations_url":"https://api.github.com/users/bkueng/orgs","repos_url":"https://api.github.com/users/bkueng/repos","events_url":"https://api.github.com/users/bkueng/events{/privacy}","received_events_url":"https://api.github.com/users/bkueng/received_events","type":"User","site_admin":false},"comments":13,"review_comments":23,"maintainer_can_modify":false,"commits":11,"additions":335,"deletions":343,"changed_files":31}}
{"actor":{"display_login":"bkueng"}}