From 6534a9657c297292c04bf24ff97f7dfc9884e9c8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 9 Mar 2024 22:28:14 +1100 Subject: [PATCH] AP_Proximity: cope with AP_OADATABASE_ENABLED being false --- libraries/AP_Proximity/AP_Proximity_Backend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Proximity/AP_Proximity_Backend.cpp b/libraries/AP_Proximity/AP_Proximity_Backend.cpp index d037621f70..d5467ce01b 100644 --- a/libraries/AP_Proximity/AP_Proximity_Backend.cpp +++ b/libraries/AP_Proximity/AP_Proximity_Backend.cpp @@ -122,7 +122,7 @@ void AP_Proximity_Backend::database_push(float angle, float pitch, float distanc void AP_Proximity_Backend::database_push(float angle, float pitch, float distance, uint32_t timestamp_ms, const Vector3f ¤t_pos, const Matrix3f &body_to_ned) { -#if !APM_BUILD_TYPE(APM_BUILD_AP_Periph) +#if AP_OADATABASE_ENABLED AP_OADatabase *oaDb = AP::oadatabase(); if (oaDb == nullptr || !oaDb->healthy()) { return; @@ -142,7 +142,7 @@ void AP_Proximity_Backend::database_push(float angle, float pitch, float distanc temp_pos.z = temp_pos.z * -1.0f; oaDb->queue_push(temp_pos, timestamp_ms, distance); -#endif +#endif // AP_OADATABASE_ENABLED } #endif // HAL_PROXIMITY_ENABLED