move subsystem_info entirely into commander and remove from uORB

* HealthFlags: define bitfield using 1<<X

Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
Daniel Agar
2020-10-25 10:08:15 -04:00
committed by GitHub
co-authored by Matthias Grob
parent ea3d202370
commit 945c17bc3f
18 changed files with 44 additions and 92 deletions
+6 -8
View File
@@ -1722,14 +1722,6 @@ Commander::run()
battery_status_check();
/* update subsystem info which arrives from outside of commander*/
subsystem_info_s info;
while (_subsys_sub.update(&info)) {
set_health_flags(info.subsystem_type, info.present, info.enabled, info.ok, status);
_status_changed = true;
}
/* If in INIT state, try to proceed to STANDBY state */
if (!status_flags.condition_calibration_enabled && status.arming_state == vehicle_status_s::ARMING_STATE_INIT) {
@@ -3803,6 +3795,12 @@ void Commander::data_link_check()
_status_changed = true;
}
}
const bool present = true;
const bool enabled = true;
const bool ok = (iridium_status.last_heartbeat > 0); // maybe at some point here an additional check should be made
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_SATCOM, present, enabled, ok, status);
}
break;