update 电单车协议

This commit is contained in:
Guoqs
2024-08-29 15:24:29 +08:00
parent 430a03ba7e
commit d60d50ed8a
4 changed files with 30 additions and 44 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.pile.domain.ebike;
import com.jsowell.common.YouDianUtils;
import com.jsowell.common.util.BytesUtil;
import com.jsowell.pile.domain.ebike.deviceupload.*;
import lombok.Getter;
@@ -73,7 +74,7 @@ public abstract class AbsEBikeMessage {
// 读取物理ID
byte[] physicalIdBytes = Arrays.copyOfRange(messageBytes, 5, 9);
int physicalId = BytesUtil.convertToPhysicalId(physicalIdBytes);
int physicalId = YouDianUtils.convertToPhysicalId(physicalIdBytes);
// 读取消息ID
byte[] messageIdBytes = Arrays.copyOfRange(messageBytes, 9, 11);