From d9d4cc75b78f8094d0ed029d61b6a37733186548 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 20 Jun 2020 16:45:21 -0700 Subject: Update GT06 decoder --- src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index b222cbf58..859d850d1 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -768,16 +768,16 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { } } - if (type == MSG_GPS_LBS_1 && buf.readableBytes() == 4 + 6) { - position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); - } - if (type == MSG_GPS_LBS_2 && buf.readableBytes() == 3 + 6) { position.set(Position.KEY_IGNITION, buf.readUnsignedByte() > 0); position.set(Position.KEY_EVENT, buf.readUnsignedByte()); // reason position.set(Position.KEY_ARCHIVE, buf.readUnsignedByte() > 0); } + if (buf.readableBytes() == 4 + 6) { + position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); + } + } else if (type == MSG_ALARM) { DateBuilder dateBuilder = new DateBuilder(deviceSession.getTimeZone()) -- cgit v1.2.3