GCS_Fence: cope with avoidance not being compiled in

This commit is contained in:
Peter Barker 2024-03-09 13:56:19 +11:00 committed by Peter Barker
parent f6e7b9de5b
commit ceb45a9c3b
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ void GCS_MAVLINK::send_fence_status() const
// report on Avoidance liminting
uint8_t breach_mitigation = FENCE_MITIGATE_UNKNOWN;
#if !APM_BUILD_TYPE(APM_BUILD_ArduPlane)
#if AP_AVOIDANCE_ENABLED && !APM_BUILD_TYPE(APM_BUILD_ArduPlane)
const AC_Avoid* avoid = AC_Avoid::get_singleton();
if (avoid != nullptr) {
if (avoid->limits_active()) {