mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_SITL: remove deprecated --uartX options
Code remains to check for use of these options and give an error which contains the correct option to use, due to the non-intuitive mapping between --uartX and --serialN. A future version will remove that code too.
This commit is contained in:
parent
3d4490b339
commit
0956b4f65d
|
@ -21,16 +21,6 @@ _ap_bin() {
|
||||||
'--gimbal[enable simulated MAVLink gimbal]' \
|
'--gimbal[enable simulated MAVLink gimbal]' \
|
||||||
'--autotest-dir[set directory for additional files]:DIR:' \
|
'--autotest-dir[set directory for additional files]:DIR:' \
|
||||||
'--defaults[set path to defaults file]:PATH:' \
|
'--defaults[set path to defaults file]:PATH:' \
|
||||||
'--uartA[(deprecated) set device string for SERIAL0]:DEVICE:' \
|
|
||||||
'--uartC[(deprecated) set device string for SERIAL1]:DEVICE:' \
|
|
||||||
'--uartD[(deprecated) set device string for SERIAL2]:DEVICE:' \
|
|
||||||
'--uartB[(deprecated) set device string for SERIAL3]:DEVICE:' \
|
|
||||||
'--uartE[(deprecated) set device string for SERIAL4]:DEVICE:' \
|
|
||||||
'--uartF[(deprecated) set device string for SERIAL5]:DEVICE:' \
|
|
||||||
'--uartG[(deprecated) set device string for SERIAL6]:DEVICE:' \
|
|
||||||
'--uartH[(deprecated) set device string for SERIAL7]:DEVICE:' \
|
|
||||||
'--uartI[(deprecated) set device string for SERIAL8]:DEVICE:' \
|
|
||||||
'--uartJ[(deprecated) set device string for SERIAL9]:DEVICE:' \
|
|
||||||
'--serial0[set device string for SERIAL0]:DEVICE:' \
|
'--serial0[set device string for SERIAL0]:DEVICE:' \
|
||||||
'--serial1[set device string for SERIAL1]:DEVICE:' \
|
'--serial1[set device string for SERIAL1]:DEVICE:' \
|
||||||
'--serial2[set device string for SERIAL2]:DEVICE:' \
|
'--serial2[set device string for SERIAL2]:DEVICE:' \
|
||||||
|
|
|
@ -96,16 +96,6 @@ void SITL_State::_usage(void)
|
||||||
"\t--gimbal enable simulated MAVLink gimbal\n"
|
"\t--gimbal enable simulated MAVLink gimbal\n"
|
||||||
"\t--autotest-dir DIR set directory for additional files\n"
|
"\t--autotest-dir DIR set directory for additional files\n"
|
||||||
"\t--defaults path set path to defaults file\n"
|
"\t--defaults path set path to defaults file\n"
|
||||||
"\t--uartA device (deprecated) set device string for SERIAL0\n"
|
|
||||||
"\t--uartC device (deprecated) set device string for SERIAL1\n" // ordering captures the historical use of uartB as SERIAL3
|
|
||||||
"\t--uartD device (deprecated) set device string for SERIAL2\n"
|
|
||||||
"\t--uartB device (deprecated) set device string for SERIAL3\n"
|
|
||||||
"\t--uartE device (deprecated) set device string for SERIAL4\n"
|
|
||||||
"\t--uartF device (deprecated) set device string for SERIAL5\n"
|
|
||||||
"\t--uartG device (deprecated) set device string for SERIAL6\n"
|
|
||||||
"\t--uartH device (deprecated) set device string for SERIAL7\n"
|
|
||||||
"\t--uartI device (deprecated) set device string for SERIAL8\n"
|
|
||||||
"\t--uartJ device (deprecated) set device string for SERIAL9\n"
|
|
||||||
"\t--serial0 device set device string for SERIAL0\n"
|
"\t--serial0 device set device string for SERIAL0\n"
|
||||||
"\t--serial1 device set device string for SERIAL1\n"
|
"\t--serial1 device set device string for SERIAL1\n"
|
||||||
"\t--serial2 device set device string for SERIAL2\n"
|
"\t--serial2 device set device string for SERIAL2\n"
|
||||||
|
@ -474,11 +464,9 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
|
||||||
static const uint8_t mapping[] = { 0, 3, 1, 2, 4, 5, 6, 7, 8, 9 };
|
static const uint8_t mapping[] = { 0, 3, 1, 2, 4, 5, 6, 7, 8, 9 };
|
||||||
int serial_idx = mapping[uart_idx];
|
int serial_idx = mapping[uart_idx];
|
||||||
char uart_letter = (char)(uart_idx)+'A';
|
char uart_letter = (char)(uart_idx)+'A';
|
||||||
printf("WARNING: deprecated option --uart%c will be removed in a "
|
printf("ERROR: Removed option --uart%c supplied. "
|
||||||
"future release. Use --serial%d instead.\n",
|
"Use --serial%d instead.\n", uart_letter, serial_idx);
|
||||||
uart_letter, serial_idx);
|
exit(1);
|
||||||
_serial_path[serial_idx] = gopt.optarg;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case CMDLINE_SERIAL0:
|
case CMDLINE_SERIAL0:
|
||||||
case CMDLINE_SERIAL1:
|
case CMDLINE_SERIAL1:
|
||||||
|
|
Loading…
Reference in New Issue