Skip to content

Commit e91cd66

Browse files
README: clarify tx deadline behavior for canardTxPoll (#255)
This fixes the ambiguity reported in #159 comments where `tx_deadline_usec = 0` looked like an unlimited deadline in examples. cc @pavel-kirienko @blutack --------- Co-authored-by: laktoosivaba <rooh1622@gmail.com>
1 parent d362f19 commit e91cd66

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const struct CanardTransferMetadata transfer_metadata = {
116116
++my_message_transfer_id; // The transfer-ID shall be incremented after every transmission on this subject.
117117
int32_t result = canardTxPush(&queue, // Call this once per redundant CAN interface (queue).
118118
&canard,
119-
tx_deadline_usec, // Zero if transmission deadline is not limited.
119+
tx_deadline_usec, // Transmission deadline (absolute monotonic time in usec).
120120
&transfer_metadata,
121121
47, // Size of the message payload (see Nunavut transpiler).
122122
"\x2D\x00" "Sancho, it strikes me thou art in great fear.",

libcanard/canard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ struct CanardTxQueue canardTxInit(const size_t capacity,
519519
/// Therefore, normally, the timestamp value should be in the future.
520520
/// The library compares (now>deadline) to determine which frames timed out, and so could
521521
/// be dropped (incrementing frames_expired, unless NULL).
522-
/// If this timeout behavior is not needed, the timestamp value can be set to zero.
522+
/// If this timeout behavior is not needed, pass now_usec=0 to canardTxPush()/canardTxPoll().
523523
///
524524
/// The described above automatic dropping of timed-out frames was added in the v4 of the library as an optional
525525
/// feature. It is applied only to the frames that are already in the TX queue (not the new ones that are being pushed

0 commit comments

Comments
 (0)