mirror of https://github.com/ArduPilot/ardupilot
AP_CANManager: moved UART port locking up to AP_HAL
This commit is contained in:
parent
8fd5341b5b
commit
aa74615ce1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue