AP_Logger: log accumulated power status flags; all flags ever set

This commit is contained in:
Peter Barker 2020-07-20 10:34:43 +10:00 committed by Andrew Tridgell
parent bd8c4017bc
commit 721d94a23b
2 changed files with 4 additions and 1 deletions

View File

@ -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));

View File

@ -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), \