update 电单车

This commit is contained in:
Guoqs
2024-09-12 14:38:13 +08:00
parent fc1703c654
commit 1ec15040b9
2 changed files with 3 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ public class EBikeMessageCmd03 extends AbsEBikeMessage {
@Data
public static class SettlementInfo {
private int chargingDuration; // 充电时长, 单位:"秒"
private int chargingTime; // 充电时长, 单位:"秒"
private int maxPower; // 最大功率, 单位:"0.1W"
private int consumedEnergy; // 耗电量, 单位:"0.01度"
private int portNumber; // 端口号
@@ -47,7 +47,7 @@ public class EBikeMessageCmd03 extends AbsEBikeMessage {
// private String placeholderDuration; // 占位时长 充电柜专用,其他设备忽略此字段 表示充满后占用设备的时长,单位为分钟
public SettlementInfo(byte[] dataBytes) {
this.chargingDuration = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, 0, 2));
this.chargingTime = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, 0, 2));
this.maxPower = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, 2, 4));
this.consumedEnergy = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, 4, 6));
this.portNumber = BytesUtil.bytesToIntLittle(new byte[]{dataBytes[6]});