From 3303323971f02cff6eb2fc029562bc4309b69b5d Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 24 May 2023 15:53:09 +0200 Subject: [PATCH] mavlink stream: Heartbeat system status should neglect the actuator_armed.lockdown flag in HIL, since this is always enabled for HIL. --- src/modules/mavlink/streams/HEARTBEAT.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/mavlink/streams/HEARTBEAT.hpp b/src/modules/mavlink/streams/HEARTBEAT.hpp index 26d966a85a..18665491f0 100644 --- a/src/modules/mavlink/streams/HEARTBEAT.hpp +++ b/src/modules/mavlink/streams/HEARTBEAT.hpp @@ -122,7 +122,8 @@ private: } // system_status overrides - if (actuator_armed.force_failsafe || actuator_armed.lockdown || actuator_armed.manual_lockdown + if (actuator_armed.force_failsafe || (actuator_armed.lockdown + && vehicle_status.hil_state == vehicle_status_s::HIL_STATE_OFF) || actuator_armed.manual_lockdown || vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_TERMINATION) { system_status = MAV_STATE_FLIGHT_TERMINATION;