AP_CANManager: moved UART port locking up to AP_HAL

This commit is contained in:
Andrew Tridgell 2023-07-07 18:46:52 +10:00
parent 8fd5341b5b
commit aa74615ce1
1 changed files with 1 additions and 1 deletions

View File

@ -722,7 +722,7 @@ int16_t SLCAN::CANIface::receive(AP_HAL::CANFrame& out_frame, uint64_t& rx_time,
// flush bytes from port
while (num_bytes--) {
uint8_t b;
if (!_port->read_locked(_serial_lock_key, b)) {
if (!_port->read_locked(&b, 1, _serial_lock_key)) {
break;
}
addByte(b);