mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-28 10:43:58 -04:00
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
This commit is contained in:
parent
279a57dc10
commit
700aaf2e8f
@ -30,7 +30,10 @@ void setup(void)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
start all UARTs at 57600 with default buffer sizes
|
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.uartA, "uartA"); // console
|
||||||
setup_uart(hal.uartB, "uartB"); // 1st GPS
|
setup_uart(hal.uartB, "uartB"); // 1st GPS
|
||||||
setup_uart(hal.uartC, "uartC"); // telemetry 1
|
setup_uart(hal.uartC, "uartC"); // telemetry 1
|
||||||
|
Loading…
Reference in New Issue
Block a user