From a5fd60ec71aead28c63f33c85fbfbd23286eb50b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 1 Aug 2023 17:06:28 +1000 Subject: [PATCH] AP_CANManager: fixed usage of read_locked this didn't actually cause an issue, but is wrong --- libraries/AP_CANManager/AP_SLCANIface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_CANManager/AP_SLCANIface.cpp b/libraries/AP_CANManager/AP_SLCANIface.cpp index c19e3c56d6..c635494ac6 100644 --- a/libraries/AP_CANManager/AP_SLCANIface.cpp +++ b/libraries/AP_CANManager/AP_SLCANIface.cpp @@ -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(&b, 1, _serial_lock_key)) { + if (_port->read_locked(&b, 1, _serial_lock_key) != 1) { break; } addByte(b);