AP_IOMCU: break logging out as a method

This commit is contained in:
Peter Barker 2022-08-07 16:36:42 +10:00 committed by Andrew Tridgell
parent f3cd5a9a38
commit 0be9c83692
2 changed files with 7 additions and 0 deletions

View File

@ -351,6 +351,11 @@ void AP_IOMCU::read_status()
}
}
write_log();
}
void AP_IOMCU::write_log()
{
uint32_t now = AP_HAL::millis();
if (now - last_log_ms >= 1000U) {
last_log_ms = now;

View File

@ -269,6 +269,8 @@ private:
void handle_repeated_failures();
void check_iomcu_reset();
void write_log(); // handle onboard logging
static AP_IOMCU *singleton;
enum {