From bf17b1d9a3471562153bfd1789887c1c79e4cb73 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 6 Feb 2025 17:57:47 +1100 Subject: [PATCH] Plane: correct abs function used for integer --- ArduPlane/mode_autoland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/mode_autoland.cpp b/ArduPlane/mode_autoland.cpp index 347ddfa06d..2a9bc2bd58 100644 --- a/ArduPlane/mode_autoland.cpp +++ b/ArduPlane/mode_autoland.cpp @@ -137,7 +137,7 @@ bool ModeAutoLand::_enter() const float bearing_offset_deg = (bearing_err_deg > 0) ? -90 : 90; // Try and minimize loiter radius by using the smaller of the waypoint loiter radius or 1/3 of the final WP distance - const float loiter_radius = MIN(final_wp_dist * 0.333, fabsf(plane.aparm.loiter_radius)); + const float loiter_radius = MIN(final_wp_dist * 0.333, abs(plane.aparm.loiter_radius)); // corrected_loiter_radius is the radius the vehicle will actually fly, this gets larger as altitude increases. // Strictly this gets the loiter radius at the current altitude, really we want the loiter radius at final_wp_alt.