mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 03:55:17 +08:00
update 电单车
This commit is contained in:
@@ -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]});
|
||||
|
||||
Reference in New Issue
Block a user