From ab9ff21bec23723132ed8183979be22b67c1cb3c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 6 Oct 2022 07:04:31 -0700 Subject: Fix Huabao responses --- src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 0eded4b42..27555d46d 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -165,8 +165,8 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { if (serial.matches("[0-9]+")) { return serial; } else { - long imei = id.readUnsignedShort(); - imei = (imei << 32) + id.readUnsignedInt(); + long imei = id.getUnsignedShort(0); + imei = (imei << 32) + id.getUnsignedInt(2); return String.valueOf(imei); } } -- cgit v1.2.3