5
0
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:
Peter Barker 2021-12-20 19:08:33 +11:00 committed by Randy Mackay
parent a9c78fe7e3
commit f6fa676411

View File

@ -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) {