update 电单车协议

This commit is contained in:
Guoqs
2024-08-19 15:45:33 +08:00
parent 9afb6edf1f
commit ad4eb9f0f0

View File

@@ -65,7 +65,7 @@ public class PowerHeartbeat {
/** /**
* 该时间段内消耗电量此数据需除以4800后才是真实的电量该字段属于调试使用服务器无需关心此字段 * 该时间段内消耗电量此数据需除以4800后才是真实的电量该字段属于调试使用服务器无需关心此字段
*/ */
private String timePeriodElectricity; // private String timePeriodElectricity;
/** /**
* 峰值功率:整个充电过程中出现过的最大功率,有些版本无此字段 * 峰值功率:整个充电过程中出现过的最大功率,有些版本无此字段
@@ -95,7 +95,7 @@ public class PowerHeartbeat {
/** /**
* 上发指令当时的时间,有时候不准确,该字段属于调试使用,服务器无需关心此字段 * 上发指令当时的时间,有时候不准确,该字段属于调试使用,服务器无需关心此字段
*/ */
private String timestamp; // private String timestamp;
/** /**
* 占位时长:(充电柜专用,其他设备忽略此字段)表示充满后占用设备的时长,单位为分钟 * 占位时长:(充电柜专用,其他设备忽略此字段)表示充满后占用设备的时长,单位为分钟
@@ -150,8 +150,8 @@ public class PowerHeartbeat {
length = 1; length = 1;
this.portTemperature = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + ""; this.portTemperature = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + "";
length = 4; // length = 4;
this.timestamp = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + ""; // this.timestamp = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + "";
length = 2; length = 2;
this.occupancyTime = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + ""; this.occupancyTime = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + "";