From 731aaed8afee260f493621ec80ef957f0f8a37a8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 8 Jul 2017 16:26:34 +1000 Subject: [PATCH] GCS_MAVLink: eliminate global static GCS_MAVLINK::send_home_all --- libraries/GCS_MAVLink/GCS.cpp | 20 ++++++++++++++++++++ libraries/GCS_MAVLink/GCS.h | 3 ++- libraries/GCS_MAVLink/GCS_Common.cpp | 20 -------------------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS.cpp b/libraries/GCS_MAVLink/GCS.cpp index 469d362d47..6a347a9663 100644 --- a/libraries/GCS_MAVLink/GCS.cpp +++ b/libraries/GCS_MAVLink/GCS.cpp @@ -15,3 +15,23 @@ void GCS::send_text(MAV_SEVERITY severity, const char *fmt, ...) text[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN] = 0; send_statustext(severity, GCS_MAVLINK::active_channel_mask() | GCS_MAVLINK::streaming_channel_mask(), text); } + +#define FOR_EACH_ACTIVE_CHANNEL(methodcall) \ + do { \ + for (uint8_t i=0; i