GCS_MAVLink: implement sys_status.errors_comm

This commit is contained in:
Dr.-Ing. Amilcar do Carmo Lucas
2025-06-03 09:44:57 +10:00
committed by Andrew Tridgell
parent a285940f6d
commit b6157591ec
+6 -1
View File
@@ -5902,6 +5902,11 @@ void GCS_MAVLINK::send_sys_status()
const uint16_t errors1 = errors & 0xffff;
const uint16_t errors2 = (errors>>16) & 0xffff;
const uint16_t errors4 = AP::internalerror().count() & 0xffff;
uint16_t errors_comm = 0;
mavlink_status_t *ms = mavlink_get_channel_status(chan);
if (ms) {
errors_comm = ms->packet_rx_drop_count;
}
#if HAL_LOGGING_ENABLED
const uint16_t dropped_logmessage_count = AP::logger().num_dropped();
@@ -5929,7 +5934,7 @@ void GCS_MAVLINK::send_sys_status()
-1,
#endif
0, // comm drops %,
0, // comm drops in pkts,
errors_comm, // comm drops in pkts,
errors1,
errors2,
dropped_logmessage_count, // errors3