Showing
1 changed file
with
3 additions
and
3 deletions
1 | 1 | package org.thingsboard.server.common.data.yunteng.utils; |
2 | 2 | |
3 | -import org.thingsboard.server.common.data.yunteng.enums.TkModebusCheckType; | |
3 | +import org.thingsboard.server.common.data.yunteng.enums.TkModBusCheckType; | |
4 | 4 | |
5 | 5 | public class CrcUtils { |
6 | 6 | /** |
... | ... | @@ -8,7 +8,7 @@ public class CrcUtils { |
8 | 8 | * @param buf buffer to be crc |
9 | 9 | * @return crc result word |
10 | 10 | */ |
11 | - static int alex_crc16(TkModebusCheckType algorithm, byte[] buf) { | |
11 | + static int alex_crc16(TkModBusCheckType algorithm, byte[] buf) { | |
12 | 12 | int i, j; |
13 | 13 | int c, crc = algorithm.getInit(); |
14 | 14 | for (i = 0; i < buf.length; i++) { |
... | ... | @@ -29,7 +29,7 @@ public class CrcUtils { |
29 | 29 | * @param toSend string to be convert |
30 | 30 | * @return buffer with crc word, high byte if after low byte according the modbus |
31 | 31 | */ |
32 | - public static String getSendBuf(TkModebusCheckType algorithm,String toSend) { | |
32 | + public static String getSendBuf(TkModBusCheckType algorithm, String toSend) { | |
33 | 33 | byte[] bb = ByteUtils.hexToBytes(toSend); |
34 | 34 | int ri = alex_crc16(algorithm,bb); |
35 | 35 | if(!algorithm.getByteOrder()){ | ... | ... |