aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-19 12:30:54 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-19 12:30:54 +1200
commit9e75f24dc7ddeac4a7059829cd0c24a4f43e988f (patch)
tree21f6a5ec5a6ac556afae0b7cb3bbb9ccb0456c0d /src/org
parente1487b1a5d40543e803e362d821e541a31d4e072 (diff)
downloadtraccar-server-9e75f24dc7ddeac4a7059829cd0c24a4f43e988f.tar.gz
traccar-server-9e75f24dc7ddeac4a7059829cd0c24a4f43e988f.tar.bz2
traccar-server-9e75f24dc7ddeac4a7059829cd0c24a4f43e988f.zip
Implement GT06 mileage parsing (fix #1308)
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 3bbe87e36..07f6dc7d5 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -216,6 +216,10 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
position.set(Event.KEY_GSM, buf.readUnsignedByte());
}
}
+
+ if (type == MSG_GPS_LBS_1 && buf.readableBytes() == 4 + 6) {
+ position.set(Event.KEY_ODOMETER, buf.readUnsignedInt());
+ }
// Index
if (buf.readableBytes() > 6) {