summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-09-27 16:10:57 -0400
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-09-27 16:13:07 -0400
commitf83e53554021a93e280c3faa9a6e6d436b0e1572 (patch)
tree8a099e247c07a39959b811605b1b993543ea7f80
parentdefe74b77bf96a88ec334afd1871ff0058bf4464 (diff)
Fix rendering of message arb ID in strings - use hex, not decimal.
-rw-r--r--src/uds/uds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/uds/uds.c b/src/uds/uds.c
index ed46b4a9..d5a40bcf 100644
--- a/src/uds/uds.c
+++ b/src/uds/uds.c
@@ -314,8 +314,8 @@ 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,
- "arb_id: 0x%" SCNd32 ", mode: 0x%x, ",
- response->arbitration_id,
+ "arb_id: 0x%lx, mode: 0x%x, ",
+ (unsigned long) response->arbitration_id,
response->mode);
if(response->has_pid) {
@@ -351,8 +351,8 @@ 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,
- "arb_id: 0x%" SCNd32 ", mode: 0x%x, ",
- request->arbitration_id,
+ "arb_id: 0x%lx, mode: 0x%x, ",
+ (unsigned long) request->arbitration_id,
request->mode);
if(request->has_pid) {