From e13512bdf694dc8e0f96a5d58e52d577d51e7eb2 Mon Sep 17 00:00:00 2001 From: laktoosivaba Date: Fri, 20 Feb 2026 18:34:22 +0200 Subject: [PATCH 1/5] README: clarify tx deadline semantics for canardTxPoll --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f8fc9981..bee14a2c 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ const struct CanardTransferMetadata transfer_metadata = { ++my_message_transfer_id; // The transfer-ID shall be incremented after every transmission on this subject. int32_t result = canardTxPush(&queue, // Call this once per redundant CAN interface (queue). &canard, - tx_deadline_usec, // Zero if transmission deadline is not limited. + tx_deadline_usec, // Transmission deadline (absolute monotonic time in usec). &transfer_metadata, 47, // Size of the message payload (see Nunavut transpiler). "\x2D\x00" "Sancho, it strikes me thou art in great fear.", @@ -154,6 +154,9 @@ for (struct CanardTxQueueItem* ti = NULL; (ti = canardTxPeek(&queue)) != NULL;) 💡 New in v4.0: optionally, you can now use `canardTxPoll()` that automates the above for you. +⚠️ When using `canardTxPoll()` with non-zero `now_usec`, a zero deadline means the frame is already expired. +Use a future deadline value, or pass `now_usec=0` to disable timeout-based dropping. + Transfer reception is done by feeding frames into the transfer reassembly state machine from any of the redundant interfaces. But first, we need to subscribe: From 62d7deff50b8f6d97ca49ec8c6cd8502c410158e Mon Sep 17 00:00:00 2001 From: laktoosivaba Date: Fri, 20 Feb 2026 18:45:18 +0200 Subject: [PATCH 2/5] docs: clarify zero deadline semantics in API header --- libcanard/canard.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcanard/canard.h b/libcanard/canard.h index c6737134..d5c6fd69 100644 --- a/libcanard/canard.h +++ b/libcanard/canard.h @@ -519,7 +519,8 @@ struct CanardTxQueue canardTxInit(const size_t capacity, /// Therefore, normally, the timestamp value should be in the future. /// The library compares (now>deadline) to determine which frames timed out, and so could /// be dropped (incrementing frames_expired, unless NULL). -/// If this timeout behavior is not needed, the timestamp value can be set to zero. +/// If this timeout behavior is not needed, pass now_usec=0 to canardTxPush()/canardTxPoll(). +/// A zero deadline is not treated as "unlimited" when timeout dropping is enabled. /// /// The described above automatic dropping of timed-out frames was added in the v4 of the library as an optional /// feature. It is applied only to the frames that are already in the TX queue (not the new ones that are being pushed From 31c170e91ee111a481b43954ab8a0b98aa18fbbe Mon Sep 17 00:00:00 2001 From: laktoosivaba Date: Fri, 20 Feb 2026 18:47:42 +0200 Subject: [PATCH 3/5] docs: apply review suggestion to trim README warning --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index bee14a2c..690dd87f 100644 --- a/README.md +++ b/README.md @@ -154,8 +154,6 @@ for (struct CanardTxQueueItem* ti = NULL; (ti = canardTxPeek(&queue)) != NULL;) 💡 New in v4.0: optionally, you can now use `canardTxPoll()` that automates the above for you. -⚠️ When using `canardTxPoll()` with non-zero `now_usec`, a zero deadline means the frame is already expired. -Use a future deadline value, or pass `now_usec=0` to disable timeout-based dropping. Transfer reception is done by feeding frames into the transfer reassembly state machine from any of the redundant interfaces. From 1e3afa579122dfff36982ad7aa6abe9ab8ff5a5c Mon Sep 17 00:00:00 2001 From: laktoosivaba Date: Fri, 20 Feb 2026 18:54:55 +0200 Subject: [PATCH 4/5] docs: remove extra blank line in README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 690dd87f..38182f87 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,6 @@ for (struct CanardTxQueueItem* ti = NULL; (ti = canardTxPeek(&queue)) != NULL;) 💡 New in v4.0: optionally, you can now use `canardTxPoll()` that automates the above for you. - Transfer reception is done by feeding frames into the transfer reassembly state machine from any of the redundant interfaces. But first, we need to subscribe: From 3e45c4e0d0c0581e74b53dfd0f1715a9a1518a15 Mon Sep 17 00:00:00 2001 From: laktoosivaba Date: Fri, 20 Feb 2026 18:56:25 +0200 Subject: [PATCH 5/5] docs: apply review suggestion to trim header wording --- libcanard/canard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libcanard/canard.h b/libcanard/canard.h index d5c6fd69..bdc53ea2 100644 --- a/libcanard/canard.h +++ b/libcanard/canard.h @@ -520,7 +520,6 @@ struct CanardTxQueue canardTxInit(const size_t capacity, /// The library compares (now>deadline) to determine which frames timed out, and so could /// be dropped (incrementing frames_expired, unless NULL). /// If this timeout behavior is not needed, pass now_usec=0 to canardTxPush()/canardTxPoll(). -/// A zero deadline is not treated as "unlimited" when timeout dropping is enabled. /// /// The described above automatic dropping of timed-out frames was added in the v4 of the library as an optional /// feature. It is applied only to the frames that are already in the TX queue (not the new ones that are being pushed