mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 01:10:35 +08:00
replace + with &&
This commit is contained in:
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);
|
||||
|
||||
Reference in New Issue
Block a user