Просмотр исходного кода

Display function codes in hexadecimal in debug mode

Stéphane Raimbault 13 лет назад
Родитель
Сommit
7fed3ff9b8
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/modbus.c

+ 1 - 1
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) {