mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-27 01:50:34 +08:00
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 <silvan@auterion.com>
This commit is contained in:
1 parent
fe0662edb1
commit
43c6d582ad
2 files changed
+3
-5
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user