Browse Source

AP_Arming: skip checks if not HAL_PROXIMITY_ENABLED

c415-sdk
Randy Mackay 4 years ago
parent
commit
d53c8b1dd0
  1. 2
      libraries/AP_Arming/AP_Arming.cpp

2
libraries/AP_Arming/AP_Arming.cpp

@ -843,6 +843,7 @@ bool AP_Arming::system_checks(bool report) @@ -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 @@ -857,6 +858,7 @@ bool AP_Arming::proximity_checks(bool report) const
check_failed(report, "check proximity sensor");
return false;
}
#endif
return true;
}

Loading…
Cancel
Save