Skip to content

Commit

Permalink
GCS_MAVLink: implement sys_status.errors_comm
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed Feb 13, 2024
1 parent e58dd0d commit ef03774
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libraries/GCS_MAVLink/GCS_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5462,6 +5462,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;
}

mavlink_msg_sys_status_send(
chan,
Expand All @@ -5479,7 +5484,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,
0, // errors3
Expand Down

0 comments on commit ef03774

Please sign in to comment.