Browse Source

GCS_MAVLink: Pause to allow serial port to drain.

This avoids a race between the UART and the auto flow control code.
master
Brad Bosch 10 years ago committed by Andrew Tridgell
parent
commit
c87a7c7df9
  1. 3
      libraries/GCS_MAVLink/GCS_Common.cpp

3
libraries/GCS_MAVLink/GCS_Common.cpp

@ -89,6 +89,9 @@ GCS_MAVLINK::setup_uart(const AP_SerialManager& serial_manager, AP_SerialManager
uart->write(0x30); uart->write(0x30);
uart->write(0x20); uart->write(0x20);
} }
// since tcdrain() and TCSADRAIN may not be implemented...
hal.scheduler->delay(1);
uart->set_flow_control(old_flow_control); uart->set_flow_control(old_flow_control);
// now change back to desired baudrate // now change back to desired baudrate

Loading…
Cancel
Save