From 8cdd0cc43846713bebbc7caa1f5f0fca84e267d6 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 19 三月 2025 14:21:10 +0800
Subject: [PATCH] 优化
---
server/jtt808_parent/jtt808-protocol/src/main/java/org/yzh/protocol/commons/transform/attribute/Battery.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/jtt808_parent/jtt808-protocol/src/main/java/org/yzh/protocol/commons/transform/attribute/Battery.java b/server/jtt808_parent/jtt808-protocol/src/main/java/org/yzh/protocol/commons/transform/attribute/Battery.java
index 24e98a9..26885aa 100644
--- a/server/jtt808_parent/jtt808-protocol/src/main/java/org/yzh/protocol/commons/transform/attribute/Battery.java
+++ b/server/jtt808_parent/jtt808-protocol/src/main/java/org/yzh/protocol/commons/transform/attribute/Battery.java
@@ -66,14 +66,14 @@
}
if(value!=null && value.length>4){
try {
- this.setVoltage((float) (Byte2NumberUtils.bytesToInteger(new byte[]{value[2],value[3]}) * 0.001));
+ this.setVoltage((float) (Byte2NumberUtils.bytesToInteger(new byte[]{value[2],value[3]}) * 0.01));
}catch (Exception e){
}
}
if(value!=null && value.length>6){
try {
- this.setChargeVoltage((float) (Byte2NumberUtils.bytesToInteger(new byte[]{value[4],value[4]}) * 0.001));
+ this.setChargeVoltage((float) (Byte2NumberUtils.bytesToInteger(new byte[]{value[4],value[4]}) * 0.01));
}catch (Exception e){
}
--
Gitblit v1.9.3