mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 04:03:33 +08:00
mc_att_control_main: use gradual() for throttle curve rescale without hover thrust
This commit is contained in:
@@ -101,7 +101,7 @@ MulticopterAttitudeControl::throttle_curve(float throttle_stick_input)
|
||||
// throttle_stick_input is in range [0, 1]
|
||||
switch (_param_mpc_thr_curve.get()) {
|
||||
case 1: // no rescaling to hover throttle
|
||||
return throttle_min + throttle_stick_input * (_param_mpc_thr_max.get() - throttle_min);
|
||||
return math::gradual(throttle_stick_input, 0.f, 1.f, throttle_min, _param_mpc_thr_max.get());
|
||||
|
||||
default: // 0 or other: rescale to hover throttle at 0.5 stick
|
||||
return math::gradual3(throttle_stick_input,
|
||||
|
||||
Reference in New Issue
Block a user