Skip to content

Commit

Permalink
bugfix: NMEA GPS update rate was 0 since num_bytes_read was not being…
Browse files Browse the repository at this point in the history
… updated
  • Loading branch information
dronesalot committed Nov 17, 2024
1 parent 101384e commit 514a812
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/drivers/gps/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ 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)
Expand Down

0 comments on commit 514a812

Please sign in to comment.