mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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:
parent
101384e155
commit
b955588b26
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user