0x03帧,则不进行crc校验

This commit is contained in:
Guoqs
2024-11-27 08:49:47 +08:00
parent 34ad0023c8
commit 88b8339e22

View File

@@ -52,6 +52,13 @@ public class YKCUtils {
log.error("起始位必须是0x68");
return false;
}
// 如果是0x03帧则不进行crc校验
if (0x03 == frameType[0]) {
log.info("0x03帧则不进行crc校验");
return true;
}
// 序列号域+加密标志+帧类型标志+消息体
byte[] data = Bytes.concat(serialNumber, encryptFlag, frameType, msgBody);
// 校验长度