From 988028f765fee7119ac5a8b57ed2e43320382955 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Feb 2023 08:08:46 +1100 Subject: [PATCH] AP_RCProtocol: on IOMCU don't allow protocol to change once detected this prevents a crash where in-flight noise causes an incorrect protocol detection, such as DSM for a SBUS input --- libraries/AP_RCProtocol/AP_RCProtocol.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_RCProtocol/AP_RCProtocol.cpp b/libraries/AP_RCProtocol/AP_RCProtocol.cpp index 65520dbed5..1b73608a2d 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol.cpp +++ b/libraries/AP_RCProtocol/AP_RCProtocol.cpp @@ -76,6 +76,11 @@ bool AP_RCProtocol::should_search(uint32_t now_ms) const if (_detected_protocol != AP_RCProtocol::NONE && !rc().multiple_receiver_support()) { return false; } +#else + // on IOMCU don't allow protocol to change once detected + if (_detected_protocol != AP_RCProtocol::NONE) { + return false; + } #endif return (now_ms - _last_input_ms >= 200); }