mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-09 08:04:14 -03:00
Copter: log power status on Pixhawk
This commit is contained in:
parent
9d6005edd8
commit
2bf7a46c9b
@ -574,6 +574,8 @@ static bool mavlink_try_send_message(mavlink_channel_t chan, enum ap_message id,
|
|||||||
case MSG_EXTENDED_STATUS1:
|
case MSG_EXTENDED_STATUS1:
|
||||||
CHECK_PAYLOAD_SIZE(SYS_STATUS);
|
CHECK_PAYLOAD_SIZE(SYS_STATUS);
|
||||||
send_extended_status1(chan, packet_drops);
|
send_extended_status1(chan, packet_drops);
|
||||||
|
CHECK_PAYLOAD_SIZE(POWER_STATUS);
|
||||||
|
gcs[chan-MAVLINK_COMM_0].send_power_status();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSG_EXTENDED_STATUS2:
|
case MSG_EXTENDED_STATUS2:
|
||||||
|
@ -228,6 +228,9 @@ static void Log_Write_Current()
|
|||||||
current_total : battery.current_total_mah()
|
current_total : battery.current_total_mah()
|
||||||
};
|
};
|
||||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||||
|
|
||||||
|
// also write power status
|
||||||
|
DataFlash.Log_Write_Power();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PACKED log_Optflow {
|
struct PACKED log_Optflow {
|
||||||
|
Loading…
Reference in New Issue
Block a user