From 9211aa5aec5c620da8d272d691a5c0f4be5e4a7d Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 26 May 2019 11:02:40 +0200 Subject: [PATCH] LP-457 Clear Rx buffer after baudrate change --- flight/modules/GPS/GPS.c | 1 + 1 file changed, 1 insertion(+) diff --git a/flight/modules/GPS/GPS.c b/flight/modules/GPS/GPS.c index 8b880f69e..dc3ecda73 100644 --- a/flight/modules/GPS/GPS.c +++ b/flight/modules/GPS/GPS.c @@ -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);