GCS_MAVLink: filter out additional messages for High Latency link

This commit is contained in:
Stephen Dade 2024-03-04 22:59:45 +11:00 committed by Peter Barker
parent 84a5a52351
commit faf2ae3a9c
2 changed files with 9 additions and 0 deletions

View File

@ -99,6 +99,11 @@ void GCS::send_to_active_channels(uint32_t msgid, const char *pkt)
if (!c.is_active()) {
continue;
}
#if HAL_HIGH_LATENCY2_ENABLED
if (c.is_high_latency_link) {
continue;
}
#endif
// size checks done by this method:
c.send_message(pkt, entry);
}

View File

@ -1856,7 +1856,11 @@ GCS_MAVLINK::update_receive(uint32_t max_time_us)
// send a timesync message every 10 seconds; this is for data
// collection purposes
#if HAL_HIGH_LATENCY2_ENABLED
if (tnow - _timesync_request.last_sent_ms > _timesync_request.interval_ms && !is_private() && !is_high_latency_link) {
#else
if (tnow - _timesync_request.last_sent_ms > _timesync_request.interval_ms && !is_private()) {
#endif
if (HAVE_PAYLOAD_SPACE(chan, TIMESYNC)) {
send_timesync();
_timesync_request.last_sent_ms = tnow;