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
master
Chinese66 7 years ago committed by Randy Mackay
parent
commit
700aaf2e8f
  1. 5
      libraries/AP_HAL/examples/UART_test/UART_test.cpp

5
libraries/AP_HAL/examples/UART_test/UART_test.cpp

@ -30,7 +30,10 @@ void setup(void) @@ -30,7 +30,10 @@ 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