forked from Archive/PX4-Autopilot
MC pos control: Enforce minimum throttle in manual attitude control mode only if not landed, else default to idle throttle
This commit is contained in:
parent
7b05165249
commit
5982eaaf34
|
@ -1414,8 +1414,12 @@ MulticopterPositionControl::task_main()
|
||||||
/* control throttle directly if no climb rate controller is active */
|
/* control throttle directly if no climb rate controller is active */
|
||||||
if (!_control_mode.flag_control_climb_rate_enabled) {
|
if (!_control_mode.flag_control_climb_rate_enabled) {
|
||||||
_att_sp.thrust = math::min(_manual.z, _params.thr_max);
|
_att_sp.thrust = math::min(_manual.z, _params.thr_max);
|
||||||
|
|
||||||
|
/* enforce minimum throttle if not landed */
|
||||||
|
if (!_vehicle_status.condition_landed) {
|
||||||
_att_sp.thrust = math::max(_att_sp.thrust, _params.thr_min);
|
_att_sp.thrust = math::max(_att_sp.thrust, _params.thr_min);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* construct attitude setpoint rotation matrix */
|
/* construct attitude setpoint rotation matrix */
|
||||||
math::Matrix<3,3> R_sp;
|
math::Matrix<3,3> R_sp;
|
||||||
|
|
Loading…
Reference in New Issue