diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-23 17:14:47 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 17:14:47 +1000 |
commit | e911fa2c7e4138b1edaa95ab603617660cea0462 (patch) | |
tree | 8b07a5f6c4e272eb3d574ad2398442b07c848fe6 /src/org/traccar/protocol/TotemProtocolDecoder.java | |
parent | 6c6b62351aadd68928b9bd3e39e2bf96d78695e8 (diff) | |
parent | f9065826c7855d1344ba75a4eb46da325eb91cab (diff) | |
download | trackermap-server-e911fa2c7e4138b1edaa95ab603617660cea0462.tar.gz trackermap-server-e911fa2c7e4138b1edaa95ab603617660cea0462.tar.bz2 trackermap-server-e911fa2c7e4138b1edaa95ab603617660cea0462.zip |
Merge pull request #2240 from Abyss777/odometer
Odometer units for first part of protocols
Diffstat (limited to 'src/org/traccar/protocol/TotemProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index 72c0f6306..e7a689a8b 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -252,7 +252,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { } position.set(Position.PREFIX_TEMP + 1, parser.next()); - position.set(Position.KEY_ODOMETER, parser.next()); + position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000); } else if (pattern == PATTERN3) { if (parser.hasNext()) { @@ -314,7 +314,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { position.setSpeed(UnitsConverter.knotsFromKph(parser.nextDouble())); position.set(Position.KEY_HDOP, parser.nextDouble()); - position.set(Position.KEY_ODOMETER, parser.nextInt()); + position.set(Position.KEY_ODOMETER, parser.nextInt() * 1000); position.setValid(true); position.setLatitude(parser.nextCoordinate()); |