Skip to content
Snippets Groups Projects
Commit 48fa3fbc authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Beat Küng
Browse files

PositionControl: thrust setpoint check with fabsf

parent 26ffda50
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment