From a025794bae0f5280780c8cda61e8be43b9898505 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 7 Jun 2019 09:23:06 +1000 Subject: [PATCH] GCS_MAVLink: correct is_streaming check and update of is-streaming mask --- libraries/GCS_MAVLink/GCS.h | 2 +- libraries/GCS_MAVLink/GCS_Common.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index 516d8379d3..7217a4eee2 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -378,7 +378,7 @@ public: return GCS_MAVLINK::active_channel_mask() & (1 << (chan-MAVLINK_COMM_0)); } bool is_streaming() const { - return GCS_MAVLINK::streaming_channel_mask() & (1 << (chan-MAVLINK_COMM_0)); + return sending_bucket_id != no_bucket_to_send; } mavlink_channel_t get_chan() const { return chan; } diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 8893db203a..8d2d027ae6 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -1659,6 +1659,12 @@ void GCS_MAVLINK::send_message(enum ap_message id) { if (id == MSG_HEARTBEAT) { save_signing_timestamp(false); + // update the mask of all streaming channels + if (is_streaming()) { + GCS_MAVLINK::chan_is_streaming |= (1U<