aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-20 06:12:15 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-20 06:12:15 +1300
commite024acd5226383375c00b2632f72114d6345f446 (patch)
tree147ca5fa7da591eb2603a3493e8410d6d07c7ed9 /src/org/traccar
parentaadee3c138fac9f36afc14339365d29429d38416 (diff)
downloadtrackermap-server-e024acd5226383375c00b2632f72114d6345f446.tar.gz
trackermap-server-e024acd5226383375c00b2632f72114d6345f446.tar.bz2
trackermap-server-e024acd5226383375c00b2632f72114d6345f446.zip
Convert GL200 odometer to meters
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index 5d30f51cf..ef434b779 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -456,11 +456,11 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
position.set("dtcsCodes", parser.next());
position.set(Position.KEY_THROTTLE, parser.next());
position.set(Position.KEY_FUEL, parser.next());
- position.set(Position.KEY_OBD_ODOMETER, parser.next());
+ position.set(Position.KEY_OBD_ODOMETER, parser.nextInt() * 1000);
decodeLocation(position, parser);
- position.set(Position.KEY_ODOMETER, parser.next());
+ position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);
if (parser.hasNext(6)) {
DateBuilder dateBuilder = new DateBuilder()
@@ -515,7 +515,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);
position.set(Position.KEY_BATTERY, parser.next());
- position.set(Position.KEY_ODOMETER, parser.next());
+ position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);
position.set(Position.KEY_HOURS, parser.next());
position.set(Position.PREFIX_ADC + 1, parser.next());
position.set(Position.PREFIX_ADC + 2, parser.next());
@@ -671,7 +671,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
decodeLocation(position, parser);
- position.set(Position.KEY_ODOMETER, parser.next());
+ position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);
position.set(Position.KEY_BATTERY, parser.next());
position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000);