aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-11-05 18:16:22 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-11-05 18:16:22 -0800
commit959c2762c7a8bd65f98b41c45e5e990fe5ff714d (patch)
treedcc1dbc39cd138c3d0bfa3bff4b3cc484a2e208b /src/main/java/org/traccar
parent24569e916846905dad286a8f4e0fed0691ac4e42 (diff)
downloadtrackermap-server-959c2762c7a8bd65f98b41c45e5e990fe5ff714d.tar.gz
trackermap-server-959c2762c7a8bd65f98b41c45e5e990fe5ff714d.tar.bz2
trackermap-server-959c2762c7a8bd65f98b41c45e5e990fe5ff714d.zip
Use mileage for odometer
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java b/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java
index e2f1454af..5ffddb318 100644
--- a/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java
@@ -75,8 +75,8 @@ public class StarcomProtocolDecoder extends BaseProtocolDecoder {
case "eventid":
position.set(Position.KEY_EVENT, Integer.parseInt(value));
break;
- case "odometer":
- position.set(Position.KEY_ODOMETER, Long.parseLong(value));
+ case "mileage":
+ position.set(Position.KEY_ODOMETER, (long) (Double.parseDouble(value) * 1000));
break;
case "satellites":
position.set(Position.KEY_SATELLITES, Integer.parseInt(value));