mirror of https://github.com/rusefi/isotp-c.git
Update string formatting for new arb ID size.
This commit is contained in:
parent
a8f4bf42ee
commit
b2745c6092
|
@ -1,5 +1,6 @@
|
||||||
#include <isotp/isotp.h>
|
#include <isotp/isotp.h>
|
||||||
#include <bitfield/bitfield.h>
|
#include <bitfield/bitfield.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
/* void isotp_set_timeout(IsoTpHandler* handler, uint16_t timeout_ms) { */
|
/* void isotp_set_timeout(IsoTpHandler* handler, uint16_t timeout_ms) { */
|
||||||
/* handler->timeout_ms = timeout_ms; */
|
/* handler->timeout_ms = timeout_ms; */
|
||||||
|
@ -18,7 +19,7 @@ IsoTpShims isotp_init_shims(LogShim log, SendCanMessageShim send_can_message,
|
||||||
|
|
||||||
void isotp_message_to_string(const IsoTpMessage* message, char* destination,
|
void isotp_message_to_string(const IsoTpMessage* message, char* destination,
|
||||||
size_t destination_length) {
|
size_t destination_length) {
|
||||||
snprintf(destination, destination_length, "ID: 0x%02x, Payload: 0x%02x%02x%02x%02x%02x%02x%02x%02x",
|
snprintf(destination, destination_length, "ID: 0x%" SCNd32 ", Payload: 0x%02x%02x%02x%02x%02x%02x%02x%02x",
|
||||||
message->arbitration_id,
|
message->arbitration_id,
|
||||||
message->payload[0],
|
message->payload[0],
|
||||||
message->payload[1],
|
message->payload[1],
|
||||||
|
|
Loading…
Reference in New Issue