From 43c6d582adaa0b19090bdbdb0873da0babcbe619 Mon Sep 17 00:00:00 2001 From: Silvan Date: Thu, 15 Oct 2026 08:55:08 +0200 Subject: [PATCH] feat(fw_rate_control): remove 2% thrust motor cutoff This avoids non-linear beahvior around the 2% mark, especially when the motor has a slew rate defined (as it is the case for IC engines). Signed-off-by: Silvan --- docs/en/actuators/internal_combustion_engine.md | 2 -- src/modules/fw_rate_control/FixedwingRateControl.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/en/actuators/internal_combustion_engine.md b/docs/en/actuators/internal_combustion_engine.md index 74cc0a4bb4a..483567c4874 100644 --- a/docs/en/actuators/internal_combustion_engine.md +++ b/docs/en/actuators/internal_combustion_engine.md @@ -74,8 +74,6 @@ In other words, a setpoint of `0` produces the configured **Minimum** output and ::: info When the engine is commanded off, the throttle setpoint is `NAN`, which by definition drives the output to its configured **Disarmed** value rather than to **Minimum**. This lets you park the throttle servo at an idle-stop position that is different from the closed-throttle position used to switch off the engine. - -The throttle output also goes to _Disarmed_ while the engine is running if the [idle governor](#idle-rpm-governor) is disabled and the throttle demand drops to near zero (the fixed-wing controller stops the motor below 2% thrust). ::: Points to note when setting the values: diff --git a/src/modules/fw_rate_control/FixedwingRateControl.cpp b/src/modules/fw_rate_control/FixedwingRateControl.cpp index 6917a62dc7d..9ff0922da91 100644 --- a/src/modules/fw_rate_control/FixedwingRateControl.cpp +++ b/src/modules/fw_rate_control/FixedwingRateControl.cpp @@ -420,9 +420,9 @@ void FixedwingRateControl::Run() float thrust_setpoint = _rates_sp.thrust_body[0]; - // Stop motor if its setpoint is below 2%. This value was determined empirically (RC stick inaccuracy). - // Motor is stopped by setting the output to NAN (per definition). - if (PX4_ISFINITE(thrust_setpoint) && thrust_setpoint > 0.02f) { + // Zero thrust is passed through and maps to the motor's minimum output (PWM_MIN etc.). + // Motor is stopped by setting the output to NAN (per definition) if the setpoint is invalid. + if (PX4_ISFINITE(thrust_setpoint)) { /* scale effort by battery status */ if (_param_fw_bat_scale_en.get()) {