1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

LP-457 Clear Rx buffer after baudrate change

This commit is contained in:
Laurent Lalanne 2019-05-26 11:02:40 +02:00
parent 22d624f40b
commit 9211aa5aec

View File

@ -569,6 +569,7 @@ void gps_set_fc_baud_from_arg(uint8_t baud)
previous_baud = baud;
// Set Revo port hwsettings_baud
PIOS_COM_ChangeBaud(PIOS_COM_GPS, hwsettings_gpsspeed_enum_to_baud(baud));
PIOS_COM_ClearRxBuffer(PIOS_COM_GPS);
GPSPositionSensorBaudRateSet(&baud);
} else {
DEBUG_PRINTF(3, "SetBaud:%d - NoChange\r", baud);