From 3d52f8fb1245215768c1dcea45b2dd9327580075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 15 Mar 2025 13:46:40 +0100 Subject: [PATCH] meh --- src/gps/GPS.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 0bbbd68a2..7f490ea3c 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1107,7 +1107,13 @@ int32_t GPS::runOnce() // clear the GPS rx/tx buffer as quickly as possible void GPS::clearBuffer() { +#ifdef ARCH_ESP32 _serial_gps->flush(false); +#else + int x = _serial_gps->available(); + while (x--) + _serial_gps->read(); +#endif } /// Prepare the GPS for the cpu entering deep or light sleep, expect to be gone for at least 100s of msecs