mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车协议
This commit is contained in:
@@ -62,6 +62,8 @@ public class EBikeMessageCmd21 extends AbsEBikeMessage {
|
||||
*/
|
||||
private List<String> portStatus;
|
||||
|
||||
private List<String> statusDescList;
|
||||
|
||||
/**
|
||||
* 信号强度:指分机与主机之间的无线信号强度,如LORA信号。00则为有线组网或无信号强度功能
|
||||
*/
|
||||
@@ -79,11 +81,14 @@ public class EBikeMessageCmd21 extends AbsEBikeMessage {
|
||||
|
||||
byte[] statusBytes = BytesUtil.copyBytes(dataBytes, 3, this.portNumber);
|
||||
List<String> statusList = Lists.newArrayList();
|
||||
List<String> statusDescList = Lists.newArrayList();
|
||||
for (byte statusByte : statusBytes) {
|
||||
int status = BytesUtil.bytesToIntLittle(new byte[]{statusByte});
|
||||
statusList.add(PortStatusEnum.getDescriptionByValue(status));
|
||||
statusList.add(String.valueOf(status));
|
||||
statusDescList.add(PortStatusEnum.getDescriptionByValue(status));
|
||||
}
|
||||
this.portStatus = statusList;
|
||||
this.statusDescList = statusDescList;
|
||||
this.rssi = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, dataBytes.length - 2, dataBytes.length - 1)) + "";
|
||||
//
|
||||
int i = BytesUtil.bytesToIntLittle(Arrays.copyOfRange(dataBytes, dataBytes.length - 1, dataBytes.length));
|
||||
|
||||
Reference in New Issue
Block a user