From da166b256da1723b8db23fe86b574e2726af549f Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sun, 29 Mar 2020 15:30:46 +0100 Subject: [PATCH] GCS_MAVLink: add messages to Spektrum telemetry if it is enabled --- libraries/GCS_MAVLink/GCS_Common.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 3d5bf5d028..a8e4a641d5 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -1850,7 +1851,12 @@ void GCS::send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list, u if (frsky != nullptr) { frsky->queue_message(severity, first_piece_of_text); } - +#if HAL_SPEKTRUM_TELEM_ENABLED + AP_Spektrum_Telem* spektrum = AP::spektrum_telem(); + if (spektrum != nullptr) { + spektrum->queue_message(severity, first_piece_of_text); + } +#endif AP_Notify *notify = AP_Notify::get_singleton(); if (notify) { notify->send_text(first_piece_of_text); @@ -2034,7 +2040,6 @@ void GCS::setup_uarts() frsky = nullptr; } } - #if !HAL_MINIMIZE_FEATURES ltm_telemetry.init(); devo_telemetry.init();