update 电单车协议

This commit is contained in:
Guoqs
2024-09-04 09:17:08 +08:00
parent 057f431cd7
commit 06d8587c46
4 changed files with 25 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
package com.jsowell.common.enums.ebike;
import com.jsowell.common.util.BytesUtil;
public enum EBikeTypeEnum {
socket_1way(0x03, "单路插座"),
@@ -23,6 +25,10 @@ public enum EBikeTypeEnum {
return desc;
}
public byte[] getBytes() {
return BytesUtil.intToBytesLittle(value, 1);
}
EBikeTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;