From 6c5c88f72e4f976777bcbe949252cfb6fd03a56a Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Fri, 18 Jul 2025 19:40:53 +0200 Subject: [PATCH] Commander: only trigger MAVLink parachute on termination This can now be tested using the new termination RC switch. --- src/modules/commander/Commander.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 112f824f20..bb5b576035 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -1907,13 +1907,9 @@ void Commander::run() _actuator_armed.force_failsafe = (_vehicle_status.nav_state == _vehicle_status.NAVIGATION_STATE_TERMINATION); // _actuator_armed.in_esc_calibration_mode // VEHICLE_CMD_PREFLIGHT_CALIBRATION - // if force_failsafe or manual_lockdown activated send parachute command - if ((!actuator_armed_prev.force_failsafe && _actuator_armed.force_failsafe) - || (!actuator_armed_prev.manual_lockdown && _actuator_armed.manual_lockdown) - ) { - if (isArmed()) { - send_parachute_command(); - } + // if force_failsafe activated send parachute command + if (!actuator_armed_prev.force_failsafe && _actuator_armed.force_failsafe && isArmed()) { + send_parachute_command(); } // publish states (armed, control_mode, vehicle_status, failure_detector_status) at 2 Hz or immediately when changed