Browse Source

AP_HAL: add delay to UART_test example

For AC3.5 and higher version, serial uartA-USBconsole cannot work. Maybe the code before "setup" has been changed. Ensure that the uartA can be initialized
mission-4.1.18
Chinese66 7 years ago committed by Randy Mackay
parent
commit
700aaf2e8f
  1. 3
      libraries/AP_HAL/examples/UART_test/UART_test.cpp

3
libraries/AP_HAL/examples/UART_test/UART_test.cpp

@ -31,6 +31,9 @@ void setup(void) @@ -31,6 +31,9 @@ void setup(void)
/*
start all UARTs at 57600 with default buffer sizes
*/
hal.scheduler->delay(1000); //Ensure that the uartA can be initialized
setup_uart(hal.uartA, "uartA"); // console
setup_uart(hal.uartB, "uartB"); // 1st GPS
setup_uart(hal.uartC, "uartC"); // telemetry 1

Loading…
Cancel
Save