aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gps103ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-17 15:52:01 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-17 15:52:01 +1200
commitf5868e7cd0e40706c19c5a5f28490b8968a50b88 (patch)
treef8c479e716aa156086b5c786160c563c7f1d8115 /src/org/traccar/protocol/Gps103ProtocolDecoder.java
parent73ecddc51d9c998e08ffa85d54a8e6da90567f36 (diff)
downloadtrackermap-server-f5868e7cd0e40706c19c5a5f28490b8968a50b88.tar.gz
trackermap-server-f5868e7cd0e40706c19c5a5f28490b8968a50b88.tar.bz2
trackermap-server-f5868e7cd0e40706c19c5a5f28490b8968a50b88.zip
Normalize RPM values
Diffstat (limited to 'src/org/traccar/protocol/Gps103ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 49f1a2049..890465ab9 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -207,14 +207,14 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
getLastLocation(position, parser.nextDateTime());
position.set(Position.KEY_ODOMETER, parser.nextInt());
- parser.next(); // instant fuel consumption
- position.set(Position.KEY_FUEL_CONSUMPTION, parser.next());
- position.set(Position.KEY_HOURS, parser.next());
- position.set(Position.KEY_OBD_SPEED, parser.next());
- position.set(Position.PREFIX_TEMP + 1, parser.next());
+ parser.nextDouble(); // instant fuel consumption
+ position.set(Position.KEY_FUEL_CONSUMPTION, parser.nextDouble());
+ position.set(Position.KEY_HOURS, parser.nextInt());
+ position.set(Position.KEY_OBD_SPEED, parser.nextInt());
+ position.set(Position.PREFIX_TEMP + 1, parser.nextInt());
position.set(Position.KEY_THROTTLE, parser.next());
- position.set(Position.KEY_RPM, parser.next());
- position.set(Position.KEY_BATTERY, parser.next());
+ position.set(Position.KEY_RPM, parser.nextInt());
+ position.set(Position.KEY_BATTERY, parser.nextDouble());
position.set(Position.KEY_DTCS, parser.next().replace(',', ' ').trim());
return position;