Skip to content

Commit 68d3e0d

Browse files
authored
Merge pull request #198 from haydenroche5/mbed_can_msg_fix
Fix format specifier for printing CAN message ID in CanMsg.h.
2 parents 2516a69 + a5b8e43 commit 68d3e0d

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
@@ -12,7 +12,7 @@
1212
* INCLUDE
1313
**************************************************************************************/
1414

15-
#include <stdint.h>
15+
#include <inttypes.h>
1616
#include <string.h>
1717

1818
#include <Arduino.h>
@@ -68,7 +68,7 @@ class CanMsg : public Printable
6868
size_t len = 0;
6969

7070
/* Print the header. */
71-
len = snprintf(buf, sizeof(buf), "[%08X] (%d) : ", id, data_length);
71+
len = snprintf(buf, sizeof(buf), "[%08" PRIX32 "] (%d) : ", id, data_length);
7272
size_t n = p.write(buf, len);
7373

7474
/* Print the data. */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy