AP_SerialManager: only use the first defined serial port for RCIN

This commit is contained in:
Andy Piper 2022-10-15 14:16:35 +01:00 committed by Andrew Tridgell
parent c815f04e97
commit 6b602cefec
1 changed files with 5 additions and 1 deletions

View File

@ -543,7 +543,11 @@ void AP_SerialManager::init()
#ifndef HAL_BUILD_AP_PERIPH
case SerialProtocol_RCIN:
AP::RC().add_uart(uart);
if (AP::RC().has_uart()) {
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "Duplicate RCIN configured on SERIAL%u", i);
} else {
AP::RC().add_uart(uart);
}
break;
#endif