mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00: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