diff --git a/libraries/AP_Baro/AP_Baro.cpp b/libraries/AP_Baro/AP_Baro.cpp index ce06956791..683d0124f2 100644 --- a/libraries/AP_Baro/AP_Baro.cpp +++ b/libraries/AP_Baro/AP_Baro.cpp @@ -971,7 +971,7 @@ void AP_Baro::update(void) } } } - +#ifndef HAL_BUILD_AP_PERIPH const uint32_t now_ms = AP_HAL::millis(); if (now_ms - _field_elevation_last_ms >= 1000 && fabsf(_field_elevation_active-_field_elevation) > 1.0) { if (!AP::arming().is_armed()) { @@ -987,6 +987,7 @@ void AP_Baro::update(void) BARO_SEND_TEXT(MAV_SEVERITY_ALERT, "Failed to Set Field Elevation: Armed"); } } +#endif // logging #if HAL_LOGGING_ENABLED