Code Review
/
apps
/
agl-service-can-low-level.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
|
inline
| side by side (parent:
9e7545b
)
Use proper format specifier for uint32_t.
author
Christopher Peplin
<chris.peplin@rhubarbtech.com>
Thu, 27 Feb 2014 21:06:42 +0000
(16:06 -0500)
committer
Christopher Peplin
<chris.peplin@rhubarbtech.com>
Thu, 27 Feb 2014 21:06:42 +0000
(16:06 -0500)
src/uds/uds.c
patch
|
blob
|
history
diff --git
a/src/uds/uds.c
b/src/uds/uds.c
index
510cdd4
..
31205f4
100644
(file)
--- a/
src/uds/uds.c
+++ b/
src/uds/uds.c
@@
-5,6
+5,7
@@
#include <limits.h>
#include <stddef.h>
#include <sys/param.h>
#include <limits.h>
#include <stddef.h>
#include <sys/param.h>
+#include <inttypes.h>
#define ARBITRATION_ID_OFFSET 0x8
#define MODE_RESPONSE_OFFSET 0x40
#define ARBITRATION_ID_OFFSET 0x8
#define MODE_RESPONSE_OFFSET 0x40
@@
-309,7
+310,7
@@
float diagnostic_decode_obd2_pid(const DiagnosticResponse* response) {
void diagnostic_response_to_string(const DiagnosticResponse* response,
char* destination, size_t destination_length) {
int bytes_used = snprintf(destination, destination_length,
void diagnostic_response_to_string(const DiagnosticResponse* response,
char* destination, size_t destination_length) {
int bytes_used = snprintf(destination, destination_length,
- "arb_id: 0x%
02x
, mode: 0x%x, ",
+ "arb_id: 0x%
" SCNd32 "
, mode: 0x%x, ",
response->arbitration_id,
response->mode);
response->arbitration_id,
response->mode);
@@
-346,7
+347,7
@@
void diagnostic_response_to_string(const DiagnosticResponse* response,
void diagnostic_request_to_string(const DiagnosticRequest* request,
char* destination, size_t destination_length) {
int bytes_used = snprintf(destination, destination_length,
void diagnostic_request_to_string(const DiagnosticRequest* request,
char* destination, size_t destination_length) {
int bytes_used = snprintf(destination, destination_length,
- "arb_id: 0x%
02x
, mode: 0x%x, ",
+ "arb_id: 0x%
" SCNd32 "
, mode: 0x%x, ",
request->arbitration_id,
request->mode);
request->arbitration_id,
request->mode);