From 34b775259f874d58080c82a8c97e8a7d001d71e6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 22 Sep 2024 11:35:58 +1000 Subject: [PATCH] Rover: remove handling of prearm empty-string case it is clear by inspection that this string can never be empty when the called function returns false. AP_OAPathPlanner::pre_arm_check is not that complicated! --- Rover/AP_Arming.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Rover/AP_Arming.cpp b/Rover/AP_Arming.cpp index aa19de8f41..0b8799c3f9 100644 --- a/Rover/AP_Arming.cpp +++ b/Rover/AP_Arming.cpp @@ -168,12 +168,7 @@ bool AP_Arming_Rover::oa_check(bool report) return true; } - // display failure - if (strlen(failure_msg) == 0) { - check_failed(report, "Check Object Avoidance"); - } else { - check_failed(report, "%s", failure_msg); - } + check_failed(report, "%s", failure_msg); return false; } #endif // AP_OAPATHPLANNER_ENABLED