commander: assume power is fine for HITL

This means that the preflight check indicator in QGC is green for HITL.
This commit is contained in:
Julian Oes
2021-05-07 22:38:03 -04:00
committed by Daniel Agar
parent 648a21f11d
commit ac97b5520c
@@ -63,6 +63,11 @@ bool PreFlightCheck::powerCheck(orb_advert_t *mavlink_log_pub, const vehicle_sta
return true;
}
if (status.hil_state == vehicle_status_s::HIL_STATE_ON) {
// Ignore power check in HITL.
return true;
}
uORB::SubscriptionData<system_power_s> system_power_sub{ORB_ID(system_power)};
system_power_sub.update();
const system_power_s &system_power = system_power_sub.get();