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
parent 83873de403
commit 988028f765
1 changed files with 5 additions and 0 deletions

View File

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