From 9975d7cfa9593e82ebd5d2b9b6a55cc10fa2fed2 Mon Sep 17 00:00:00 2001 From: Jari Nippula Date: Fri, 9 Aug 2024 13:00:32 +0300 Subject: [PATCH] arming state fix for HITL --- 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 26d966a85ac5..f6067d9a620d 100644 --- a/src/modules/mavlink/streams/HEARTBEAT.hpp +++ b/src/modules/mavlink/streams/HEARTBEAT.hpp @@ -122,7 +122,8 @@ class MavlinkStreamHeartbeat : public MavlinkStream } // 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;