diff --git a/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params b/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params index b31a34f073..9b56f5bbf9 100644 --- a/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params +++ b/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params @@ -307,7 +307,6 @@ 1 1 COM_HOME_EN 1 6 1 1 COM_HOME_IN_AIR 0 6 1 1 COM_IMB_PROP_ACT 0 6 -1 1 COM_LKDOWN_TKO 3.000000000000000000 9 1 1 COM_LOW_BAT_ACT 0 6 1 1 COM_OBC_LOSS_T 5.000000000000000000 9 1 1 COM_OBL_RC_ACT 0 6 diff --git a/src/modules/commander/commander_params.yaml b/src/modules/commander/commander_params.yaml index f265455db8..6c838824f5 100644 --- a/src/modules/commander/commander_params.yaml +++ b/src/modules/commander/commander_params.yaml @@ -575,20 +575,6 @@ parameters: default: 1 min: 0 max: 4 - COM_LKDOWN_TKO: - description: - short: Timeout for detecting a failure after takeoff - long: |- - A non-zero, positive value specifies the timeframe in seconds within failure detector is allowed to disarm the vehicle - if attitude exceeds the limits defined in FD_FAIL_P and FD_FAIL_R. - The check is not executed for flight modes that do support acrobatic maneuvers, e.g: Acro (MC/FW) and Manual (FW). - A zero or negative value means that the check is disabled. - type: float - default: 3.0 - unit: s - min: -1.0 - max: 5.0 - decimal: 3 COM_ARM_SDCARD: description: short: Enable FMU SD card detection check diff --git a/src/modules/commander/failsafe/failsafe.cpp b/src/modules/commander/failsafe/failsafe.cpp index 25d9728cc6..a8339e1f27 100644 --- a/src/modules/commander/failsafe/failsafe.cpp +++ b/src/modules/commander/failsafe/failsafe.cpp @@ -607,8 +607,9 @@ void Failsafe::checkStateAndMode(const hrt_abstime &time_us, const State &state, // Handle fails during spoolup just after arming - if ((_armed_time != 0) - && (time_us < _armed_time + static_cast(_param_com_spoolup_time.get() * 1_s)) + const hrt_abstime spoolup = static_cast(_param_com_spoolup_time.get() * 1_s); + + if ((_armed_time != 0) && (time_us < _armed_time + spoolup) ) { _last_state_fd_esc_arming = checkFailsafe(_caller_id_fd_esc_arming, _last_state_fd_esc_arming, status_flags.fd_esc_arming_failure, @@ -619,9 +620,7 @@ void Failsafe::checkStateAndMode(const hrt_abstime &time_us, const State &state, } // Handle fails during the early takeoff phase - if ((_armed_time != 0) - && (time_us < _armed_time - + static_cast((_param_com_lkdown_tko.get() + _param_com_spoolup_time.get()) * 1_s)) + if ((_armed_time != 0) && (time_us < _armed_time + spoolup + 3_s) ) { CHECK_FAILSAFE(status_flags, fd_critical_failure, ActionOptions(Action::Disarm).cannotBeDeferred()); diff --git a/src/modules/commander/failsafe/failsafe.h b/src/modules/commander/failsafe/failsafe.h index d5b3f0a79e..c36525e961 100644 --- a/src/modules/commander/failsafe/failsafe.h +++ b/src/modules/commander/failsafe/failsafe.h @@ -201,7 +201,6 @@ private: (ParamInt) _param_gf_action, (ParamFloat) _param_com_spoolup_time, (ParamInt) _param_com_imb_prop_act, - (ParamFloat) _param_com_lkdown_tko, (ParamInt) _param_cbrk_flightterm, (ParamInt) _param_com_actuator_failure_act, (ParamInt) _param_com_low_bat_act,