mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 20:15:06 +08:00
update 电单车
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.pile.domain.ebike.deviceupload;
|
||||
|
||||
import com.jsowell.common.YouDianUtils;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import lombok.Getter;
|
||||
@@ -42,7 +43,7 @@ public class EBikeMessageCmd06 extends AbsEBikeMessage {
|
||||
@Setter
|
||||
public static class PowerHeartbeat {
|
||||
/**
|
||||
* 端口号:当前充电的端口号。注:00表示1号端口,01表示2号端口
|
||||
* 端口号:当前充电的端口号。注:00表示1号端口,01表示2号端口; port+1为实际端口
|
||||
*/
|
||||
private String port;
|
||||
|
||||
@@ -135,7 +136,8 @@ public class EBikeMessageCmd06 extends AbsEBikeMessage {
|
||||
public PowerHeartbeat(byte[] dataBytes) {
|
||||
int startIndex = 0;
|
||||
int length = 1;
|
||||
this.port = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + "";
|
||||
int i = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length));
|
||||
this.port = i + YouDianUtils.convertPortNumberToString(i);
|
||||
|
||||
length = 1;
|
||||
this.portStatus = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, startIndex, startIndex = startIndex + length)) + "";
|
||||
|
||||
Reference in New Issue
Block a user