PositionControl: use float literals for sqrtf sign check

This commit is contained in:
Matthias Grob 2023-08-31 17:15:56 +02:00 committed by Daniel Agar
parent 3d61ab84c4
commit 2b78431566
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}