mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:33:35 +08:00
FlightTaskManualStabilized: remove double limit of yawspeed
The same paramater was used twice, once for scaling the yaw stick and once for limitng just after. This was useless.
This commit is contained in:
@@ -46,8 +46,7 @@ FlightTaskManualStabilized::FlightTaskManualStabilized(control::SuperBlock *pare
|
||||
_tilt_max_man(parent, "MPC_MAN_TILT_MAX", false),
|
||||
_throttle_min(parent, "MPC_THR_MIN", false),
|
||||
_throttle_max(parent, "MPC_THR_MAX", false),
|
||||
_throttle_hover(parent, "MPC_THR_HOVER", false),
|
||||
_yaw_rate_max(parent, "MPC_MAN_Y_MAX", false)
|
||||
_throttle_hover(parent, "MPC_THR_HOVER", false)
|
||||
{}
|
||||
|
||||
bool FlightTaskManualStabilized::activate()
|
||||
@@ -61,8 +60,6 @@ void FlightTaskManualStabilized::_scaleSticks()
|
||||
/* Scale sticks to yaw and thrust using
|
||||
* linear scale for yaw and piecewise linear map for thrust. */
|
||||
_yawspeed_setpoint = _sticks(3) * math::radians(_yaw_rate_scaling.get());
|
||||
_yawspeed_setpoint = math::sign(_yawspeed_setpoint) * math::min(fabsf(_yawspeed_setpoint),
|
||||
math::radians(_yaw_rate_max.get()));
|
||||
_throttle = _throttleCurve();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,5 +71,4 @@ private:
|
||||
control::BlockParamFloat _throttle_min; /**< minimum throttle that always has to be satisfied in flight*/
|
||||
control::BlockParamFloat _throttle_max; /**< maximum throttle that always has to be satisfied in flight*/
|
||||
control::BlockParamFloat _throttle_hover; /**< throttle value at which vehicle is at hover equilibrium */
|
||||
control::BlockParamFloat _yaw_rate_max; /** manual maximum yawspeed */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user