AP_Baro.cpp: if not define out AP Periph

This commit is contained in:
Ryan Beall 2022-01-31 14:07:31 -08:00 committed by Andrew Tridgell
parent f9840386bc
commit 9f1620f346
1 changed files with 2 additions and 1 deletions

View File

@ -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