forked from Archive/PX4-Autopilot
PositionControl: use float literals for sqrtf sign check
This commit is contained in:
parent
3d61ab84c4
commit
2b78431566
|
@ -171,9 +171,9 @@ void PositionControl::_velocityControl(const float dt)
|
|||
|
||||
// Determine how much horizontal thrust is left after prioritizing vertical control
|
||||
const float thrust_max_xy_squared = thrust_max_squared - math::sq(_thr_sp(2));
|
||||
float thrust_max_xy = 0;
|
||||
float thrust_max_xy = 0.f;
|
||||
|
||||
if (thrust_max_xy_squared > 0) {
|
||||
if (thrust_max_xy_squared > 0.f) {
|
||||
thrust_max_xy = sqrtf(thrust_max_xy_squared);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue