update 电单车协议

This commit is contained in:
Guoqs
2024-08-14 16:36:51 +08:00
parent c15a27cc25
commit e468e6e18d

View File

@@ -22,7 +22,7 @@ public class ChargingPileMessage {
private int length; // 长度 (2字节)
private int physicalId; // 物理ID (4字节)
private int messageId; // 消息ID (2字节)
private byte command; // 命令 (1字节)
private String command; // 命令 (1字节)
private byte[] data; // 数据 (n字节)
private int checksum; // 校验 (2字节)
@@ -69,7 +69,7 @@ public class ChargingPileMessage {
// 读取命令
byte command = messageBytes[11];
message.setChecksum(command);
message.setCommand(BytesUtil.bcd2StrLittle(new byte[] {command}));
// System.out.println("命令:" + BytesUtil.bcd2StrLittle(new byte[] {command}));
// 读取数据