mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 13:30:35 +08:00
PositionControl: thrust setpoint check with fabsf
This commit is contained in:
committed by
Beat Küng
parent
26ffda5079
commit
48fa3fbca3
@@ -243,10 +243,10 @@ void PositionControl::_velocityController(const float &dt)
|
||||
|
||||
}
|
||||
|
||||
/* Satureate thrust setpoint in D-direction */
|
||||
/* Saturate thrust setpoint in D-direction */
|
||||
_thr_sp(2) = math::constrain(thrust_desired_D, uMin, uMax);
|
||||
|
||||
if (_thr_sp(0) + _thr_sp(1) > FLT_EPSILON) {
|
||||
if (fabsf(_thr_sp(0)) + fabsf(_thr_sp(1)) > FLT_EPSILON) {
|
||||
|
||||
/* Thrust setpoints in NE-direction is already provided. Only
|
||||
* scaling is required.
|
||||
|
||||
Reference in New Issue
Block a user