From 98887a984be1561ede888a0c06bf21d2b8c4c456 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 15 Jul 2022 00:29:37 +0100 Subject: [PATCH] Plane: FW approach: use abs value for loiter sum check --- ArduPlane/commands_logic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index a0e83d100b..a7c2041eae 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -1044,7 +1044,7 @@ bool Plane::verify_landing_vtol_approach(const AP_Mission::Mission_Command &cmd) // require an angle total of at least 2 centidegrees, due to special casing of 1 centidegree if (((fabsf(cmd.content.location.get_distance(current_loc) - abs_radius) > 5.0f) && (cmd.content.location.get_distance(current_loc) < abs_radius)) || - (loiter.sum_cd < 2)) { + (labs(loiter.sum_cd) < 2)) { nav_controller->update_loiter(cmd.content.location, abs_radius, direction); break; }