AP_IOMCU: allow compilation with HAL_LOGGING_ENABLED false

This commit is contained in:
Peter Barker 2023-07-14 10:58:06 +10:00 committed by Andrew Tridgell
parent 6a897f01d8
commit 14beb2f191
1 changed files with 3 additions and 0 deletions

View File

@ -504,6 +504,7 @@ void AP_IOMCU::write_log()
uint32_t now = AP_HAL::millis();
if (now - last_log_ms >= 1000U) {
last_log_ms = now;
#if HAL_LOGGING_ENABLED
if (AP_Logger::get_singleton()) {
// @LoggerMessage: IOMC
// @Description: IOMCU diagnostic information
@ -525,6 +526,7 @@ void AP_IOMCU::write_log()
reg_status.num_errors,
num_delayed);
}
#endif // HAL_LOGGING_ENABLED
#if IOMCU_DEBUG_ENABLE
static uint32_t last_io_print;
if (now - last_io_print >= 5000) {
@ -548,6 +550,7 @@ void AP_IOMCU::write_log()
}
}
/*
read servo output values
*/