|
|
|
@ -295,6 +295,7 @@ struct PACKED log_Performance {
@@ -295,6 +295,7 @@ struct PACKED log_Performance {
|
|
|
|
|
uint8_t i2c_lockup_count; |
|
|
|
|
uint16_t ins_error_count; |
|
|
|
|
uint32_t log_dropped; |
|
|
|
|
uint32_t mem_avail; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Write a performance monitoring packet
|
|
|
|
@ -310,6 +311,7 @@ void Sub::Log_Write_Performance()
@@ -310,6 +311,7 @@ void Sub::Log_Write_Performance()
|
|
|
|
|
i2c_lockup_count : 0, |
|
|
|
|
ins_error_count : ins.error_count(), |
|
|
|
|
log_dropped : DataFlash.num_dropped() - perf_info_get_num_dropped(), |
|
|
|
|
hal.util->available_memory() |
|
|
|
|
}; |
|
|
|
|
DataFlash.WriteCriticalBlock(&pkt, sizeof(pkt)); |
|
|
|
|
} |
|
|
|
@ -585,7 +587,7 @@ const struct LogStructure Sub::log_structure[] = {
@@ -585,7 +587,7 @@ const struct LogStructure Sub::log_structure[] = {
|
|
|
|
|
{ LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning), |
|
|
|
|
"CTUN", "Qffffffeccfhh", "TimeUS,ThrIn,ABst,ThrOut,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt" }, |
|
|
|
|
{ LOG_PERFORMANCE_MSG, sizeof(log_Performance),
|
|
|
|
|
"PM", "QHHIhBHI", "TimeUS,NLon,NLoop,MaxT,PMT,I2CErr,INSErr,LogDrop" }, |
|
|
|
|
"PM", "QHHIhBHII", "TimeUS,NLon,NLoop,MaxT,PMT,I2CErr,INSErr,LogDrop,Mem" }, |
|
|
|
|
{ LOG_MOTBATT_MSG, sizeof(log_MotBatt), |
|
|
|
|
"MOTB", "Qffff", "TimeUS,LiftMax,BatVolt,BatRes,ThLimit" }, |
|
|
|
|
{ LOG_EVENT_MSG, sizeof(log_Event),
|
|
|
|
|