mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 22:13:33 +08:00
Switch manual_control_setpoint.z scaling from [0,1] to [-1,1]
To be consistent with all other axes of stick input and avoid future rescaling confusion. Note: for the MAVLink message 69 MANUAL_CONTROL it's using the full range according to the message specs now [-1000,1000].
This commit is contained in:
@@ -178,7 +178,7 @@ MulticopterRateControl::Run()
|
||||
math::superexpo(manual_control_setpoint.r, _param_mc_acro_expo_y.get(), _param_mc_acro_supexpoy.get())};
|
||||
|
||||
_rates_setpoint = man_rate_sp.emult(_acro_rate_max);
|
||||
_thrust_setpoint(2) = -math::constrain(manual_control_setpoint.z, 0.0f, 1.0f);
|
||||
_thrust_setpoint(2) = -(manual_control_setpoint.z + 1.f) * .5f;
|
||||
_thrust_setpoint(0) = _thrust_setpoint(1) = 0.f;
|
||||
|
||||
// publish rate setpoint
|
||||
|
||||
Reference in New Issue
Block a user