Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 36cc4b1

Browse files
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

‎api/CanMsg.h‎

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /