From 8da978b9135173eb89020c7cdeac3247adfb79fe Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 11 Sep 2019 08:57:19 +1000 Subject: [PATCH] GCS_MAVLink: use sending_mavlink1 method in send_rc_channels_raw --- libraries/GCS_MAVLink/GCS_Common.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index a9c1ff1e68..eeea59b474 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -1541,14 +1541,9 @@ bool GCS_MAVLINK::sending_mavlink1() const void GCS_MAVLINK::send_rc_channels_raw() const { - mavlink_status_t *status = mavlink_get_channel_status(chan); - if (status == nullptr) { - // should not happen - return; - } // for mavlink1 send RC_CHANNELS_RAW, for compatibility with OSD // implementations - if (!(status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1)) { + if (!sending_mavlink1()) { return; } AP_RSSI *rssi = AP::rssi();