diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-05 18:16:22 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-05 18:16:22 -0800 |
commit | 959c2762c7a8bd65f98b41c45e5e990fe5ff714d (patch) | |
tree | dcc1dbc39cd138c3d0bfa3bff4b3cc484a2e208b /src/main/java/org | |
parent | 24569e916846905dad286a8f4e0fed0691ac4e42 (diff) | |
download | traccar-server-959c2762c7a8bd65f98b41c45e5e990fe5ff714d.tar.gz traccar-server-959c2762c7a8bd65f98b41c45e5e990fe5ff714d.tar.bz2 traccar-server-959c2762c7a8bd65f98b41c45e5e990fe5ff714d.zip |
Use mileage for odometer
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java | 4 |
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)); |