diff --git a/libraries/AP_Logger/LogFile.cpp b/libraries/AP_Logger/LogFile.cpp index 4b84b84d78..b1caec9cdd 100644 --- a/libraries/AP_Logger/LogFile.cpp +++ b/libraries/AP_Logger/LogFile.cpp @@ -480,6 +480,7 @@ void AP_Logger::Write_Power(void) Vcc : hal.analogin->board_voltage(), Vservo : hal.analogin->servorail_voltage(), flags : hal.analogin->power_status_flags(), + accumulated_flags : hal.analogin->accumulated_power_status_flags(), safety_and_arm : safety_and_armed }; WriteBlock(&pkt, sizeof(pkt)); diff --git a/libraries/AP_Logger/LogStructure.h b/libraries/AP_Logger/LogStructure.h index 6ad8274cae..314d33028a 100644 --- a/libraries/AP_Logger/LogStructure.h +++ b/libraries/AP_Logger/LogStructure.h @@ -392,6 +392,7 @@ struct PACKED log_POWR { float Vcc; float Vservo; uint16_t flags; + uint16_t accumulated_flags; uint8_t safety_and_arm; }; @@ -1930,6 +1931,7 @@ struct PACKED log_Arm_Disarm { // @Field: Vcc: Flight board voltage // @Field: VServo: Servo rail voltage // @Field: Flags: System power flags +// @Field: AccFlags: Accumulated System power flags; all flags which have ever been set // @Field: Safety: Hardware Safety Switch status // @LoggerMessage: PRX @@ -2356,7 +2358,7 @@ struct PACKED log_Arm_Disarm { { LOG_BARO_MSG, sizeof(log_BARO), \ "BARO", BARO_FMT, BARO_LABELS, BARO_UNITS, BARO_MULTS }, \ { LOG_POWR_MSG, sizeof(log_POWR), \ - "POWR","QffHB","TimeUS,Vcc,VServo,Flags,Safety", "svv--", "F00--" }, \ + "POWR","QffHHB","TimeUS,Vcc,VServo,Flags,AccFlags,Safety", "svv---", "F00---" }, \ { LOG_CMD_MSG, sizeof(log_Cmd), \ "CMD", "QHHHffffLLfB","TimeUS,CTot,CNum,CId,Prm1,Prm2,Prm3,Prm4,Lat,Lng,Alt,Frame", "s-------DUm-", "F-------GG0-" }, \ { LOG_MAVLINK_COMMAND_MSG, sizeof(log_MAVLink_Command), \