Commit 0c0519331e787ba8be6c5e89ff8fc777b098f100
1 parent
fad1f08c
fix: modbus校验嘛问题修复
{ "crc": "CRC_16_LOWER", "deviceCode": "07", "method": "06", "registerAddress": 8192, "registerNumber": 1, "registerValues": [ 85 ] }
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -36,7 +36,7 @@ public class CrcUtils { | @@ -36,7 +36,7 @@ public class CrcUtils { | ||
36 | ri=ByteUtils.revert(ri); | 36 | ri=ByteUtils.revert(ri); |
37 | } | 37 | } |
38 | byte[] crc = ByteUtils.getBytes((short)ri); | 38 | byte[] crc = ByteUtils.getBytes((short)ri); |
39 | - return ByteUtils.bytesToStr(crc); | 39 | + return ByteUtils.bytesToHex(crc); |
40 | } | 40 | } |
41 | 41 | ||
42 | } | 42 | } |