mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 09:50:35 +08:00
Modified CAN driver API: Passing the next pending TX frames into the select() call to facilitate proper prioritization in the driver
This commit is contained in:
@@ -310,7 +310,9 @@ class VirtualCanDriver : public uavcan::ICanDriver,
|
||||
/**
|
||||
* This and other methods of ICanDriver will be invoked by the sub-node thread.
|
||||
*/
|
||||
int16_t select(uavcan::CanSelectMasks& inout_masks, uavcan::MonotonicTime blocking_deadline) override
|
||||
int16_t select(uavcan::CanSelectMasks& inout_masks,
|
||||
const uavcan::CanFrame* (&)[uavcan::MaxCanIfaces],
|
||||
uavcan::MonotonicTime blocking_deadline) override
|
||||
{
|
||||
bool need_block = (inout_masks.write == 0); // Write queue is infinite
|
||||
for (unsigned i = 0; need_block && (i < num_ifaces_); i++)
|
||||
|
||||
Reference in New Issue
Block a user