mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Multicopter rate controller: Protect for full throttle scaling
PX4 supports -1 to 1 as input and this module was not protected against the input range.
This commit is contained in:
@@ -192,7 +192,7 @@ MulticopterRateControl::Run()
|
||||
math::superexpo(_manual_control_setpoint.r, _param_mc_acro_expo_y.get(), _param_mc_acro_supexpoy.get())};
|
||||
|
||||
_rates_sp = man_rate_sp.emult(_acro_rate_max);
|
||||
_thrust_sp = _manual_control_setpoint.z;
|
||||
_thrust_sp = math::constrain(_manual_control_setpoint.z, 0.0f, 1.0f);
|
||||
|
||||
// publish rate setpoint
|
||||
vehicle_rates_setpoint_s v_rates_sp{};
|
||||
|
||||
Reference in New Issue
Block a user