From fb9f8d183506d1910e2d46fe7a509ea207bc42b8 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 23 Feb 2026 14:33:39 +0100 Subject: [PATCH] escCheck: remove thrust threshold above which current model applies The newer upper lower bound offset current model should apply more accurately and not require a lower bount for thrust where there's no detection. --- .../HealthAndArmingChecks/checks/escCheck.cpp | 3 +-- .../HealthAndArmingChecks/checks/escCheck.hpp | 1 - .../HealthAndArmingChecks/esc_check_params.c | 15 --------------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/modules/commander/HealthAndArmingChecks/checks/escCheck.cpp b/src/modules/commander/HealthAndArmingChecks/checks/escCheck.cpp index 946afa035f..aa884447d7 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/escCheck.cpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/escCheck.cpp @@ -254,7 +254,6 @@ uint16_t EscChecks::checkMotorStatus(const Context &context, Report &reporter, c thrust = fabsf(actuator_motors.control[actuator_function_index]); } - bool thrust_above_threshold = thrust > _param_motfail_thr.get(); bool current_too_low = current < (thrust * _param_motfail_c2t.get()) - _param_motfail_low_off.get(); bool current_too_high = current > (thrust * _param_motfail_c2t.get()) + _param_motfail_high_off.get(); @@ -263,7 +262,7 @@ uint16_t EscChecks::checkMotorStatus(const Context &context, Report &reporter, c if (!_esc_undercurrent_hysteresis[i].get_state()) { // Only set, never clear mid-air: stopping the motor in response could make it appear healthy again - _esc_undercurrent_hysteresis[i].set_state_and_update(thrust_above_threshold && current_too_low, now); + _esc_undercurrent_hysteresis[i].set_state_and_update(current_too_low, now); } if (!_esc_overcurrent_hysteresis[i].get_state()) { diff --git a/src/modules/commander/HealthAndArmingChecks/checks/escCheck.hpp b/src/modules/commander/HealthAndArmingChecks/checks/escCheck.hpp index 0e9b47361e..21319282e5 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/escCheck.hpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/escCheck.hpp @@ -72,7 +72,6 @@ private: DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase, (ParamBool) _param_com_arm_chk_escs, (ParamBool) _param_fd_act_en, - (ParamFloat) _param_motfail_thr, (ParamFloat) _param_motfail_c2t, (ParamInt) _param_motfail_time, (ParamFloat) _param_motfail_low_off, diff --git a/src/modules/commander/HealthAndArmingChecks/esc_check_params.c b/src/modules/commander/HealthAndArmingChecks/esc_check_params.c index 4f9282fd9c..64ecb1f8cd 100644 --- a/src/modules/commander/HealthAndArmingChecks/esc_check_params.c +++ b/src/modules/commander/HealthAndArmingChecks/esc_check_params.c @@ -45,21 +45,6 @@ */ PARAM_DEFINE_INT32(FD_ACT_EN, 0); -/** - * Motor Failure Thrust Threshold - * - * Failure detection per motor only triggers above this thrust value. - * Set to 1 to disable the detection. - * - * @group Motor Failure - * @unit norm - * @min 0.0 - * @max 1.0 - * @decimal 2 - * @increment 0.01 - */ -PARAM_DEFINE_FLOAT(MOTFAIL_THR, 0.2f); - /** * Motor Failure Current/Throttle Scale *