From 7c1d44bc4f05df36d880e8189fcedfefee4b6164 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Tue, 17 Nov 2020 11:47:09 -0500 Subject: [PATCH] C Example: Show transmit receipts --- examples/c/interactive/src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/c/interactive/src/main.c b/examples/c/interactive/src/main.c index c305b86..d5cb8cd 100644 --- a/examples/c/interactive/src/main.c +++ b/examples/c/interactive/src/main.c @@ -474,6 +474,8 @@ int main() { for(size_t i = 0; i < canMsg->length; i++) { printf("%02x ", canMsg->data[i]); } + if(canMsg->status.transmitMessage) + printf("TX%s %04x ", canMsg->status.globalError ? " ERR" : "", canMsg->description); printf("(%"PRIu64")\n", canMsg->timestamp); break; } @@ -519,6 +521,7 @@ int main() { msg.length = 6; msg.netid = ICSNEO_NETID_HSCAN; msg.data = sendMessageData; + msg.description = 0x1c5; // Random description to match the receipt msg.status.canfdFDF = false; msg.status.extendedFrame = false; msg.status.canfdBRS = false;