mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 17:30:35 +08:00
PositionControl: use float literals for sqrtf sign check
This commit is contained in:
committed by
Daniel Agar
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user