aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-05-17 15:28:09 -0700
committerAnton Tananaev <anton@traccar.org>2024-05-17 15:28:09 -0700
commitbb1cded19d54cd7733b6ab29240c79b9c0e1e7b7 (patch)
treebff6f466b9d1315a76b732dc622f9edfb00cf9bf /src/main/java
parentf1a3367864fde22c1df3ee1a5a5e886be496031d (diff)
downloadtrackermap-server-bb1cded19d54cd7733b6ab29240c79b9c0e1e7b7.tar.gz
trackermap-server-bb1cded19d54cd7733b6ab29240c79b9c0e1e7b7.tar.bz2
trackermap-server-bb1cded19d54cd7733b6ab29240c79b9c0e1e7b7.zip
Support ET01 OBD data
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java
index b10ff4c64..c3ff473bf 100644
--- a/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -92,7 +92,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
.number("C(d+);") // coolant temperature
.number("L(d+.d);") // fuel level
.number("[XY][MH]d+.d+;")
- .number("M(d+);") // mileage
+ .number("M(d+.?d*);") // mileage
.number("F(d+.d+);") // fuel consumption
.number("T(d+);") // engine time
.any()
@@ -264,7 +264,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ENGINE_LOAD, parser.nextDouble());
position.set(Position.KEY_COOLANT_TEMP, parser.nextInt());
position.set(Position.KEY_FUEL_LEVEL, parser.nextDouble());
- position.set(Position.KEY_ODOMETER, parser.nextInt());
+ position.set(Position.KEY_ODOMETER, parser.nextDouble());
position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble());
position.set(Position.KEY_HOURS, parser.nextInt());