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
This commit is contained in:
Andrew Tridgell 2023-02-07 08:08:46 +11:00 committed by Randy Mackay
parent 9860835ce4
commit 481cb4d03d

View File

@ -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);
}