From bd0d4f9ef04d0c8f11be8543eea5f4c78e6cf6b1 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 19 Nov 2024 12:17:36 +1100 Subject: [PATCH] AP_Logger: log RTC into PM message --- libraries/AP_Logger/LogStructure.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Logger/LogStructure.h b/libraries/AP_Logger/LogStructure.h index 432ce26376..b2a858a16f 100644 --- a/libraries/AP_Logger/LogStructure.h +++ b/libraries/AP_Logger/LogStructure.h @@ -556,6 +556,7 @@ struct PACKED log_Performance { uint32_t i2c_count; uint32_t i2c_isr_count; uint32_t extra_loop_us; + uint64_t rtc; }; struct PACKED log_SRTL { @@ -895,14 +896,15 @@ struct PACKED log_VER { // @Field: MaxT: Maximum loop time // @Field: Mem: Free memory available // @Field: Load: System processor load -// @Field: IntE: Internal error mask; which internal errors have been detected +// @Field: InE: Internal error mask; which internal errors have been detected // @FieldBitmaskEnum: IntE: AP_InternalError::error_t // @Field: ErrL: Internal error line number; last line number on which a internal error was detected -// @Field: ErrC: Internal error count; how many internal errors have been detected +// @Field: ErC: Internal error count; how many internal errors have been detected // @Field: SPIC: Number of SPI transactions processed // @Field: I2CC: Number of i2c transactions processed // @Field: I2CI: Number of i2c interrupts serviced // @Field: Ex: number of microseconds being added to each loop to address scheduler overruns +// @Field: R: RTC time, time since Unix epoch // @LoggerMessage: POWR // @Description: System power information @@ -1211,7 +1213,7 @@ LOG_STRUCTURE_FROM_MOUNT \ LOG_STRUCTURE_FROM_BEACON \ LOG_STRUCTURE_FROM_PROXIMITY \ { LOG_PERFORMANCE_MSG, sizeof(log_Performance), \ - "PM", "QHHHIIHHIIIIII", "TimeUS,LR,NLon,NL,MaxT,Mem,Load,ErrL,IntE,ErrC,SPIC,I2CC,I2CI,Ex", "sz---b%------s", "F----0A------F" }, \ + "PM", "QHHHIIHHIIIIIIQ", "TimeUS,LR,NLon,NL,MaxT,Mem,Load,ErrL,InE,ErC,SPIC,I2CC,I2CI,Ex,R", "sz---b%------ss", "F----0A------FF" }, \ { LOG_SRTL_MSG, sizeof(log_SRTL), \ "SRTL", "QBHHBfff", "TimeUS,Active,NumPts,MaxPts,Action,N,E,D", "s----mmm", "F----000" }, \ LOG_STRUCTURE_FROM_AVOIDANCE \