From 89246739c4335e34f94446579113de115b8a586b Mon Sep 17 00:00:00 2001 From: Hwurzburg Date: Sat, 31 Jul 2021 20:09:09 -0500 Subject: [PATCH] AP_RCTelemetry: warn if Passthru miss-configured Co-authored-by: Alessandro Apostoli <30294218+yaapu@users.noreply.github.com> --- libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp b/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp index 56be81a27b..cffa6e38a1 100644 --- a/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp +++ b/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp @@ -94,6 +94,14 @@ void AP_CRSF_Telem::setup_custom_telemetry() return; } + // check if passthru already assigned + const int8_t frsky_port = AP::serialmanager().find_portnum(AP_SerialManager::SerialProtocol_FrSky_SPort_Passthrough,0); + if (frsky_port != -1) { + gcs().send_text(MAV_SEVERITY_CRITICAL, "CRSF: passthrough telemetry conflict on SERIAL%d",frsky_port); + _custom_telem.init_done = true; + return; + } + // we need crossfire firmware version if (_crsf_version.pending) { return;