From 680008ba4f2c7d6cdbb832654922db3134cd3b47 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 1 Mar 2019 17:08:03 +1100 Subject: [PATCH] AP_Frsky_Telem: use gcs() to get frame string --- libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp | 1 + libraries/AP_Frsky_Telem/AP_Frsky_Telem.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp index d898dffd1c..d23b531960 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp @@ -50,6 +50,7 @@ void AP_Frsky_Telem::init(const uint32_t *ap_valuep) _protocol = AP_SerialManager::SerialProtocol_FrSky_SPort_Passthrough; // FrSky SPort and SPort Passthrough (OpenTX) protocols (X-receivers) // make frsky_telemetry available to GCS_MAVLINK (used to queue statustext messages from GCS_MAVLINK) // add firmware and frame info to message queue + const char* _frame_string = gcs().frame_string(); if (_frame_string == nullptr) { queue_message(MAV_SEVERITY_INFO, AP::fwversion().fw_string); } else { diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h index 9bad706ca4..f94e42a9a7 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h @@ -138,16 +138,12 @@ public: static ObjectArray _statustext_queue; - void set_frame_string(const char *string) { _frame_string = string; } - private: AP_HAL::UARTDriver *_port; // UART used to send data to FrSky receiver AP_SerialManager::SerialProtocol _protocol; // protocol used - detected using SerialManager's SERIAL#_PROTOCOL parameter bool _initialised_uart; uint16_t _crc; - const char *_frame_string; - struct { uint32_t value;