Skip to content

Commit 36cc4b1

Browse files
committed
Obtain the actual printable ID via getStandardId(), getExtendedId() in order to eliminate the 3 MSBits encoded status flags.
1 parent 076d86f commit 36cc4b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: api/CanMsg.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class CanMsg : public Printable
7474

7575
/* Print the header. */
7676
if (isStandardId())
77-
len = snprintf(buf, sizeof(buf), "[%03X] (%d) : ", id, data_length);
77+
len = snprintf(buf, sizeof(buf), "[%03X] (%d) : ", getStandardId(), data_length);
7878
else
79-
len = snprintf(buf, sizeof(buf), "[%08X] (%d) : ", id, data_length);
79+
len = snprintf(buf, sizeof(buf), "[%08X] (%d) : ", getExtendedId(), data_length);
8080
size_t n = p.write(buf, len);
8181

8282
/* Print the data. */

0 commit comments

Comments
 (0)