mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 17:10:34 +08:00
FlightTaskManualStabilized: replace minimum throttle with minum throttle specific for stabilized
This commit is contained in:
committed by
Lorenz Meier
parent
65603d7de7
commit
59087afac8
@@ -122,7 +122,7 @@ float FlightTaskManualStabilized::_throttleCurve()
|
||||
float throttle = -((_sticks(2) - 1.0f) * 0.5f);
|
||||
|
||||
if (throttle < 0.5f) {
|
||||
return (_throttle_hover.get() - _throttle_min.get()) / 0.5f * throttle + _throttle_min.get();
|
||||
return (_throttle_hover.get() - _throttle_min_stabilized.get()) / 0.5f * throttle + _throttle_min_stabilized.get();
|
||||
|
||||
} else {
|
||||
return (_throttle_max.get() - _throttle_hover.get()) / 0.5f * (throttle - 1.0f) + _throttle_max.get();
|
||||
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTaskManual,
|
||||
(ParamFloat<px4::params::MPC_MAN_Y_MAX>) _yaw_rate_scaling, /**< scaling factor from stick to yaw rate */
|
||||
(ParamFloat<px4::params::MPC_MAN_TILT_MAX>) _tilt_max_man, /**< maximum tilt allowed for manual flight */
|
||||
(ParamFloat<px4::params::MPC_THR_MIN>) _throttle_min, /**< minimum throttle that always has to be satisfied in flight*/
|
||||
(ParamFloat<px4::params::MPC_MANTHR_MIN>) _throttle_min_stabilized, /**< minimum throttle for stabilized */
|
||||
(ParamFloat<px4::params::MPC_THR_MAX>) _throttle_max, /**< maximum throttle that always has to be satisfied in flight*/
|
||||
(ParamFloat<px4::params::MPC_THR_HOVER>) _throttle_hover /**< throttle value at which vehicle is at hover equilibrium */
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user