소스 검색

Display function codes in hexadecimal in debug mode

Stéphane Raimbault 13 년 전
부모
커밋
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) {