diff options
author | Abyss777 <abyss@fox5.ru> | 2018-05-29 17:03:15 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-05-29 17:03:15 +0500 |
commit | c71701136245a63ea82a8a595dd51cc011ab2c35 (patch) | |
tree | 50f7daaa7addb539121f0309f779a14299b03438 /src/org/traccar/protocol/Gl200TextProtocolDecoder.java | |
parent | b41af1b39cdaa511dbf53769342ebca5b0348931 (diff) | |
download | trackermap-server-c71701136245a63ea82a8a595dd51cc011ab2c35.tar.gz trackermap-server-c71701136245a63ea82a8a595dd51cc011ab2c35.tar.bz2 trackermap-server-c71701136245a63ea82a8a595dd51cc011ab2c35.zip |
Add units converter helper
Diffstat (limited to 'src/org/traccar/protocol/Gl200TextProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gl200TextProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java index abced9ac3..7342b1263 100644 --- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -609,7 +609,8 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_THROTTLE, Integer.parseInt(values[index - 1])); } if (BitUtil.check(reportMask, 11)) { - position.set(Position.KEY_HOURS, (long) Double.parseDouble(values[index++]) * 3600000); + position.set( + Position.KEY_HOURS, UnitsConverter.millisecondsFromHours(Double.parseDouble(values[index++]))); } if (BitUtil.check(reportMask, 12)) { position.set("drivingHours", Double.parseDouble(values[index++])); |