打印日志

This commit is contained in:
Guoqs
2024-09-04 11:59:05 +08:00
parent 26ea5822d8
commit 3da69c7954
3 changed files with 106 additions and 9 deletions

View File

@@ -51,13 +51,14 @@ public enum EBikeCommandEnum {
return BytesUtil.intToBytesLittle(code, 1);
}
// public static Class<? extends AbsEBikeMessage> getMsgClassByCode(String code) {
// for (EBikeCommandEnum e : EBikeCommandEnum.values()) {
// if (e.getCode().equals(code)) {
// return e.getMsgClass();
// }
// }
// return null;
// }
// 根据code获取desc
public static String getDescByCode(int code) {
for (EBikeCommandEnum e : EBikeCommandEnum.values()) {
if (e.getCode() == code) {
return e.getDesc();
}
}
return null;
}
}