Skip to content

Commit 31ed42f

Browse files
committed
GCS_MAVLink: send dropped message count in SYS_STATUS.errors_count3
for first backend instance
1 parent 75c517d commit 31ed42f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libraries/GCS_MAVLink/GCS_Common.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5901,6 +5901,12 @@ void GCS_MAVLINK::send_sys_status()
59015901
const uint16_t errors2 = (errors>>16) & 0xffff;
59025902
const uint16_t errors4 = AP::internalerror().count() & 0xffff;
59035903

5904+
#if HAL_LOGGING_ENABLED
5905+
const uint16_t dropped_logmessage_count = AP::logger().num_dropped();
5906+
#else
5907+
const uint16_t dropped_logmessage_count = -1;
5908+
#endif // HAL_LOGGING_ENABLED
5909+
59045910
mavlink_msg_sys_status_send(
59055911
chan,
59065912
control_sensors_present,
@@ -5924,7 +5930,7 @@ void GCS_MAVLINK::send_sys_status()
59245930
0, // comm drops in pkts,
59255931
errors1,
59265932
errors2,
5927-
0, // errors3
5933+
dropped_logmessage_count, // errors3
59285934
errors4); // errors4
59295935
}
59305936

0 commit comments

Comments
 (0)