mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-03 06:28:32 -04:00
HAL_SITL: fixed mapping of --serial ports in SITL
uart paths are still in uartABCD order
This commit is contained in:
parent
46294c0fba
commit
9fd25907e2
@ -451,9 +451,11 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
|
||||
case CMDLINE_SERIAL6:
|
||||
case CMDLINE_SERIAL7:
|
||||
case CMDLINE_SERIAL8:
|
||||
case CMDLINE_SERIAL9:
|
||||
_uart_path[opt - CMDLINE_SERIAL0] = gopt.optarg;
|
||||
case CMDLINE_SERIAL9: {
|
||||
static const uint8_t mapping[] = { 0, 2, 3, 1, 4, 5, 6, 7, 8, 9 };
|
||||
_uart_path[mapping[opt - CMDLINE_SERIAL0]] = gopt.optarg;
|
||||
break;
|
||||
}
|
||||
case CMDLINE_RTSCTS:
|
||||
_use_rtscts = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user