AP_UAVCAN: handle pop from rx_queue failing
This commit is contained in:
parent
4e3c23c969
commit
2ace0f0a1f
@ -483,7 +483,9 @@ int16_t SLCAN::CAN::receive(uavcan::CanFrame& out_frame, uavcan::MonotonicTime&
|
||||
out_ts_monotonic = uavcan::MonotonicTime::fromUSec(AP_HAL::micros64());; // High precision is not required for monotonic timestamps
|
||||
uint64_t utc_usec;
|
||||
CanRxItem frm;
|
||||
rx_queue_.pop(frm);
|
||||
if (!rx_queue_.pop(frm)) {
|
||||
return 0;
|
||||
}
|
||||
out_frame = frm.frame;
|
||||
utc_usec = frm.utc_usec;
|
||||
out_flags = frm.flags;
|
||||
|
Loading…
Reference in New Issue
Block a user