From 7fed3ff9b8a5f4e02587661cd6e059a1080af30a Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Wed, 2 Nov 2011 08:38:37 +0100 Subject: [PATCH] Display function codes in hexadecimal in debug mode --- src/modbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modbus.c b/src/modbus.c index 0695363..ef71185 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -507,7 +507,7 @@ static int check_confirmation(modbus_t *ctx, uint8_t *req, if (function != req[offset]) { if (ctx->debug) { fprintf(stderr, - "Received function not corresponding to the request (%d != %d)\n", + "Received function not corresponding to the requestd (0x%X != 0x%X)\n", function, req[offset]); } if (ctx->error_recovery & MODBUS_ERROR_RECOVERY_PROTOCOL) { -- libgit2 0.21.4