aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-06-20 16:45:21 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-06-20 16:45:21 -0700
commitd9d4cc75b78f8094d0ed029d61b6a37733186548 (patch)
treeb89862e23b575e5235104adc2c8679d0140e0805 /src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
parent29ded4ce1e6e39d4d2c02bacf5e3387e7774c9bd (diff)
downloadtraccar-server-d9d4cc75b78f8094d0ed029d61b6a37733186548.tar.gz
traccar-server-d9d4cc75b78f8094d0ed029d61b6a37733186548.tar.bz2
traccar-server-d9d4cc75b78f8094d0ed029d61b6a37733186548.zip
Update GT06 decoder
Diffstat (limited to 'src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
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())