bugfix: NMEA GPS update rate was 0 since num_bytes_read was not being… (#23957)

* bugfix: NMEA GPS update rate was 0 since num_bytes_read was not being updated

* Update gps.cpp

style fix

* make format

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
S.W Develish 2024-11-18 01:16:50 +00:00 committed by GitHub
parent 101384e155
commit b955588b26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -476,6 +476,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)