diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 855a3d9a47..f716bcb0f2 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -2300,7 +2300,8 @@ int commander_thread_main(int argc, char *argv[]) /* Check for mission flight termination */ - if (armed.armed && mission_result.flight_termination) { + if (armed.armed && mission_result.flight_termination && + !status_flags.circuit_breaker_flight_termination_disabled) { armed.force_failsafe = true; status_changed = true; static bool flight_termination_printed = false; @@ -2631,7 +2632,8 @@ int commander_thread_main(int argc, char *argv[]) } /* Check for failure combinations which lead to flight termination */ - if (armed.armed) { + if (armed.armed && + !status_flags.circuit_breaker_flight_termination_disabled) { /* At this point the data link and the gps system have been checked * If we are not in a manual (RC stick controlled mode) * and both failed we want to terminate the flight */ @@ -2879,6 +2881,7 @@ get_circuit_breaker_params() status_flags.circuit_breaker_engaged_airspd_check = circuit_breaker_enabled("CBRK_AIRSPD_CHK", CBRK_AIRSPD_CHK_KEY); status_flags.circuit_breaker_engaged_enginefailure_check = circuit_breaker_enabled("CBRK_ENGINEFAIL", CBRK_ENGINEFAIL_KEY); status_flags.circuit_breaker_engaged_gpsfailure_check = circuit_breaker_enabled("CBRK_GPSFAIL", CBRK_GPSFAIL_KEY); + status_flags.circuit_breaker_flight_termination_disabled = circuit_breaker_enabled("CBRK_FLIGHTTERM", CBRK_FLIGHTTERM_KEY); } void diff --git a/src/modules/commander/state_machine_helper.h b/src/modules/commander/state_machine_helper.h index 4012c0e89f..a204381dff 100644 --- a/src/modules/commander/state_machine_helper.h +++ b/src/modules/commander/state_machine_helper.h @@ -76,6 +76,7 @@ struct status_flags_s { bool circuit_breaker_engaged_airspd_check; bool circuit_breaker_engaged_enginefailure_check; bool circuit_breaker_engaged_gpsfailure_check; + bool circuit_breaker_flight_termination_disabled; bool circuit_breaker_engaged_usb_check; bool offboard_control_signal_found_once; bool offboard_control_signal_lost;