From d53c8b1dd077a1c46445e40afc07311e49fcf08b Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 25 Mar 2021 17:05:36 +0900 Subject: [PATCH] AP_Arming: skip checks if not HAL_PROXIMITY_ENABLED --- 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 58709ac0fc..e0aeb5b595 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -843,6 +843,7 @@ bool AP_Arming::system_checks(bool report) // check nothing is too close to vehicle bool AP_Arming::proximity_checks(bool report) const { +#if HAL_PROXIMITY_ENABLED const AP_Proximity *proximity = AP::proximity(); // return true immediately if no sensor present if (proximity == nullptr) { @@ -857,6 +858,7 @@ bool AP_Arming::proximity_checks(bool report) const check_failed(report, "check proximity sensor"); return false; } +#endif return true; }