uavcan_v1: Correct transmission deadline check & fix SocketCAN tx deadline

This commit is contained in:
Peter van der Perk
2021-06-10 02:26:28 +00:00
committed by GitHub
parent ca86416ce6
commit 8c4b900f9a
2 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ void UavcanNode::transmit()
for (const CanardFrame *txf = nullptr; (txf = canardTxPeek(&_canard_instance)) != nullptr;) {
// Attempt transmission only if the frame is not yet timed out while waiting in the TX queue.
// Otherwise just drop it and move on to the next one.
if (txf->timestamp_usec == 0 || hrt_absolute_time() > txf->timestamp_usec) {
if (txf->timestamp_usec == 0 || txf->timestamp_usec > hrt_absolute_time()) {
// Send the frame. Redundant interfaces may be used here.
const int tx_res = _can_interface->transmit(*txf);