This commit is contained in:
Thomas Göttgens 2025-03-15 13:46:40 +01:00
parent 6466661c38
commit 3d52f8fb12

View File

@ -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