aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gps103ProtocolDecoder.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-05-29 17:03:15 +0500
committerAbyss777 <abyss@fox5.ru>2018-05-29 17:03:15 +0500
commitc71701136245a63ea82a8a595dd51cc011ab2c35 (patch)
tree50f7daaa7addb539121f0309f779a14299b03438 /src/org/traccar/protocol/Gps103ProtocolDecoder.java
parentb41af1b39cdaa511dbf53769342ebca5b0348931 (diff)
downloadtrackermap-server-c71701136245a63ea82a8a595dd51cc011ab2c35.tar.gz
trackermap-server-c71701136245a63ea82a8a595dd51cc011ab2c35.tar.bz2
trackermap-server-c71701136245a63ea82a8a595dd51cc011ab2c35.zip
Add units converter helper
Diffstat (limited to 'src/org/traccar/protocol/Gps103ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index f7baddfbd..3575d423e 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -21,6 +21,7 @@ import org.traccar.DeviceSession;
import org.traccar.helper.DateBuilder;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
+import org.traccar.helper.UnitsConverter;
import org.traccar.model.CellTower;
import org.traccar.model.Network;
import org.traccar.model.Position;
@@ -255,7 +256,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble(0));
Integer hours = parser.nextInt();
if (hours != null) {
- position.set(Position.KEY_HOURS, hours * 3600000);
+ position.set(Position.KEY_HOURS, UnitsConverter.millisecondsFromHours(hours));
}
position.set(Position.KEY_OBD_SPEED, parser.nextInt(0));
position.set(Position.KEY_ENGINE_LOAD, parser.next());