From 955245e4b720b2d6619805c382938c8ef22d6f14 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 8 Nov 2023 09:23:39 +1100 Subject: [PATCH] AP_Arming: make AP_RANGEFINDER_ENABLED remove more code --- libraries/AP_Arming/AP_Arming.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index dabe449715..9c4dee7f22 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -916,6 +916,7 @@ bool AP_Arming::mission_checks(bool report) bool AP_Arming::rangefinder_checks(bool report) { +#if AP_RANGEFINDER_ENABLED if (check_enabled(ARMING_CHECK_RANGEFINDER)) { RangeFinder *range = RangeFinder::get_singleton(); if (range == nullptr) { @@ -928,6 +929,7 @@ bool AP_Arming::rangefinder_checks(bool report) return false; } } +#endif return true; }