mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-02 22:18:28 -04:00
AP_AIS: correct number of bytes to read from device
This commit is contained in:
parent
a9c78fe7e3
commit
f6fa676411
@ -89,7 +89,7 @@ void AP_AIS::update()
|
||||
}
|
||||
|
||||
// read any available lines
|
||||
uint32_t nbytes = MAX(_uart->available(),1024U);
|
||||
uint32_t nbytes = MIN(_uart->available(),1024U);
|
||||
while (nbytes-- > 0) {
|
||||
const int16_t byte = _uart->read();
|
||||
if (byte == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user