AP_ADSB: correct bad port read in Sagetech driver
This commit is contained in:
parent
2aa0d915f1
commit
fbc66132e3
@ -69,8 +69,8 @@ void AP_ADSB_Sagetech::update()
|
||||
// -----------------------------
|
||||
uint32_t nbytes = MIN(_port->available(), 10 * PAYLOAD_XP_MAX_SIZE);
|
||||
while (nbytes-- > 0) {
|
||||
const int16_t data = (uint8_t)_port->read();
|
||||
if (data < 0) {
|
||||
uint8_t data;
|
||||
if (!_port->read(data)) {
|
||||
break;
|
||||
}
|
||||
if (parse_byte_XP((uint8_t)data)) {
|
||||
|
Loading…
Reference in New Issue
Block a user