AP_Proximity: cope with AP_OADATABASE_ENABLED being false

This commit is contained in:
Peter Barker 2024-03-09 22:28:14 +11:00 committed by Peter Barker
parent 97b9c5d4b5
commit 6534a9657c
1 changed files with 2 additions and 2 deletions

View File

@ -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 &current_pos, const Matrix3f &body_to_ned) void AP_Proximity_Backend::database_push(float angle, float pitch, float distance, uint32_t timestamp_ms, const Vector3f &current_pos, const Matrix3f &body_to_ned)
{ {
#if !APM_BUILD_TYPE(APM_BUILD_AP_Periph) #if AP_OADATABASE_ENABLED
AP_OADatabase *oaDb = AP::oadatabase(); AP_OADatabase *oaDb = AP::oadatabase();
if (oaDb == nullptr || !oaDb->healthy()) { if (oaDb == nullptr || !oaDb->healthy()) {
return; 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; temp_pos.z = temp_pos.z * -1.0f;
oaDb->queue_push(temp_pos, timestamp_ms, distance); oaDb->queue_push(temp_pos, timestamp_ms, distance);
#endif #endif // AP_OADATABASE_ENABLED
} }
#endif // HAL_PROXIMITY_ENABLED #endif // HAL_PROXIMITY_ENABLED