AP_Baro: allow compilation with HAL_LOGGING_ENABLED false

This commit is contained in:
Peter Barker 2023-07-14 10:58:05 +10:00 committed by Andrew Tridgell
parent 8640a96851
commit 4f6f6a7ff6
2 changed files with 8 additions and 0 deletions

View File

@ -874,6 +874,7 @@ void AP_Baro::_probe_i2c_barometers(void)
}
}
#if HAL_LOGGING_ENABLED
bool AP_Baro::should_log() const
{
AP_Logger *logger = AP_Logger::get_singleton();
@ -888,6 +889,7 @@ bool AP_Baro::should_log() const
}
return true;
}
#endif
/*
call update on all drivers

View File

@ -1,3 +1,7 @@
#include <AP_Logger/AP_Logger_config.h>
#if HAL_LOGGING_ENABLED
#include "AP_Baro.h"
#include <AP_Logger/AP_Logger.h>
@ -44,3 +48,5 @@ void AP_Baro::Write_Baro(void)
Write_Baro_instance(time_us, i);
}
}
#endif