From 1df5e62cc3d01db85785ac1cac3ef8f37774fa52 Mon Sep 17 00:00:00 2001 From: alexcekay Date: Thu, 22 Jan 2026 10:59:40 +0100 Subject: [PATCH] gps: fix rate reading on UART --- src/drivers/gps/gps.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index 857a9021a5..5fc2598848 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -488,6 +488,10 @@ int GPS::pollOrRead(uint8_t *buf, size_t buf_length, int timeout) if (_interface == GPSHelper::Interface::UART) { ret = _uart.readAtLeast(buf, buf_length, math::min(character_count, buf_length), timeout_adjusted); + if (ret > 0) { + _num_bytes_read += ret; + } + // SPI is only supported on LInux #if defined(__PX4_LINUX)