From a895d69b42bcf4cbb372e34a3d4b36d7805baa03 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Mon, 28 Aug 2017 23:04:40 -0700 Subject: [PATCH] GCS_MAVLink: Correct a bug in the FOR_EACH_ACTIVE_CHANNEL macro --- libraries/GCS_MAVLink/GCS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS.cpp b/libraries/GCS_MAVLink/GCS.cpp index 6a347a9663..9e56170a57 100644 --- a/libraries/GCS_MAVLink/GCS.cpp +++ b/libraries/GCS_MAVLink/GCS.cpp @@ -22,12 +22,12 @@ void GCS::send_text(MAV_SEVERITY severity, const char *fmt, ...) if (!chan(i).initialised) { \ continue; \ } \ - if (!(GCS_MAVLINK::active_channel_mask() & (chan(i).get_chan()-MAVLINK_COMM_0))) { \ + if (!(GCS_MAVLINK::active_channel_mask() & (1 << (chan(i).get_chan()-MAVLINK_COMM_0)))) { \ continue; \ } \ chan(i).methodcall; \ } \ - } while (0); + } while (0) void GCS::send_home(const Location &home) const {