Browse Source

HAL_SITL: added uartH

master
Andrew Tridgell 6 years ago
parent
commit
ac7a67fda0
  1. 2
      libraries/AP_HAL_SITL/HAL_SITL_Class.cpp
  2. 6
      libraries/AP_HAL_SITL/SITL_cmdline.cpp
  3. 1
      libraries/AP_HAL_SITL/Scheduler.cpp

2
libraries/AP_HAL_SITL/HAL_SITL_Class.cpp

@ -49,6 +49,7 @@ static UARTDriver sitlUart3Driver(3, &sitlState); @@ -49,6 +49,7 @@ static UARTDriver sitlUart3Driver(3, &sitlState);
static UARTDriver sitlUart4Driver(4, &sitlState);
static UARTDriver sitlUart5Driver(5, &sitlState);
static UARTDriver sitlUart6Driver(6, &sitlState);
static UARTDriver sitlUart7Driver(7, &sitlState);
static Util utilInstance(&sitlState);
@ -61,6 +62,7 @@ HAL_SITL::HAL_SITL() : @@ -61,6 +62,7 @@ HAL_SITL::HAL_SITL() :
&sitlUart4Driver, /* uartE */
&sitlUart5Driver, /* uartF */
&sitlUart6Driver, /* uartG */
&sitlUart7Driver, /* uartH */
&i2c_mgr_instance,
&emptySPI, /* spi */
&sitlAnalogIn, /* analogin */

6
libraries/AP_HAL_SITL/SITL_cmdline.cpp

@ -80,6 +80,7 @@ void SITL_State::_usage(void) @@ -80,6 +80,7 @@ void SITL_State::_usage(void)
"\t--uartE device set device string for UARTE\n"
"\t--uartF device set device string for UARTF\n"
"\t--uartG device set device string for UARTG\n"
"\t--uartH device set device string for UARTH\n"
"\t--rtscts enable rtscts on serial ports (default false)\n"
"\t--base-port PORT set port num for base port(default 5670) must be before -I option\n"
"\t--rc-in-port PORT set port num for rc in\n"
@ -190,10 +191,11 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) @@ -190,10 +191,11 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
CMDLINE_UARTE,
CMDLINE_UARTF,
CMDLINE_UARTG,
CMDLINE_UARTH,
CMDLINE_RTSCTS,
CMDLINE_BASE_PORT,
CMDLINE_RCIN_PORT,
CMDLINE_SIM_ADDRESS = 15,
CMDLINE_SIM_ADDRESS,
CMDLINE_SIM_PORT_IN,
CMDLINE_SIM_PORT_OUT,
CMDLINE_IRLOCK_PORT,
@ -223,6 +225,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) @@ -223,6 +225,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
{"uartE", true, 0, CMDLINE_UARTE},
{"uartF", true, 0, CMDLINE_UARTF},
{"uartG", true, 0, CMDLINE_UARTG},
{"uartH", true, 0, CMDLINE_UARTH},
{"rtscts", false, 0, CMDLINE_RTSCTS},
{"base-port", true, 0, CMDLINE_BASE_PORT},
{"rc-in-port", true, 0, CMDLINE_RCIN_PORT},
@ -321,6 +324,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) @@ -321,6 +324,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
case CMDLINE_UARTE:
case CMDLINE_UARTF:
case CMDLINE_UARTG:
case CMDLINE_UARTH:
_uart_path[opt - CMDLINE_UARTA] = gopt.optarg;
break;
case CMDLINE_RTSCTS:

1
libraries/AP_HAL_SITL/Scheduler.cpp

@ -205,6 +205,7 @@ void Scheduler::_run_io_procs() @@ -205,6 +205,7 @@ void Scheduler::_run_io_procs()
hal.uartE->_timer_tick();
hal.uartF->_timer_tick();
hal.uartG->_timer_tick();
hal.uartH->_timer_tick();
hal.storage->_timer_tick();
check_thread_stacks();

Loading…
Cancel
Save