diff --git a/libraries/AP_Baro/AP_Baro.cpp b/libraries/AP_Baro/AP_Baro.cpp index 6f4ceeef09..7bb6b294f2 100644 --- a/libraries/AP_Baro/AP_Baro.cpp +++ b/libraries/AP_Baro/AP_Baro.cpp @@ -895,7 +895,7 @@ void AP_Baro::update(void) } // logging -#ifndef HAL_NO_LOGGING +#if HAL_LOGGING_ENABLED if (should_log()) { Write_Baro(); }