From 3be24b6d48ab25b6bac711be2fd124b50505fa65 Mon Sep 17 00:00:00 2001 From: jcardus Date: Sun, 30 Jun 2024 04:24:10 +0100 Subject: Actualizar HuabaoProtocolDecoder.java Co-authored-by: Anton Tananaev --- src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 81f5194c8..f7145c86a 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -777,7 +777,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { break; case 0xF7: position.set(Position.KEY_BATTERY, buf.readUnsignedInt() * 0.001); - if (length > 4) { + if (length >= 5) { short batteryStatus = buf.readUnsignedByte(); switch (batteryStatus) { case 1: -- cgit v1.2.3