replace + with &&

This commit is contained in:
Dennis Mannhart
2018-10-31 08:07:01 +01:00
committed by Roman Bapst
parent 6a0a9c92fb
commit 3b92d49b64
@@ -263,7 +263,7 @@ void PositionControl::_velocityController(const float &dt)
// Saturate thrust setpoint in D-direction.
_thr_sp(2) = math::constrain(thrust_desired_D, uMin, uMax);
if (PX4_ISFINITE(_thr_sp(0)) + PX4_ISFINITE(_thr_sp(1))) {
if (PX4_ISFINITE(_thr_sp(0)) && PX4_ISFINITE(_thr_sp(1))) {
// Thrust set-point in NE-direction is already provided. Only
// scaling by the maximum tilt is required.
float thr_xy_max = fabsf(_thr_sp(2)) * tanf(_constraints.tilt);