From 518388c9c375045ec07bfbc3f7b207e0ad5fbeb9 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 8bd660bbf2..5e1ee3d5cd 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol.cpp +++ b/libraries/AP_RCProtocol/AP_RCProtocol.cpp @@ -72,6 +72,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); }