mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-02-06 03:13:00 +08:00
gps: fix rate reading on UART
This commit is contained in:
committed by
Alexander Lerach
parent
2ad25570ee
commit
1df5e62cc3
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user