aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/RitiProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/RitiProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/RitiProtocolDecoder.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/RitiProtocolDecoder.java b/src/org/traccar/protocol/RitiProtocolDecoder.java
index 1ca517057..a879633c2 100644
--- a/src/org/traccar/protocol/RitiProtocolDecoder.java
+++ b/src/org/traccar/protocol/RitiProtocolDecoder.java
@@ -66,15 +66,15 @@ public class RitiProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
position.set("mode", buf.readUnsignedByte());
- position.set("command", buf.readUnsignedByte());
- position.set(Position.KEY_POWER, buf.readUnsignedShort());
+ position.set(Position.KEY_COMMAND, buf.readUnsignedByte());
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.001);
- buf.skipBytes(5);
- buf.readUnsignedShort();
- buf.readUnsignedShort();
+ buf.skipBytes(5); // status
+ buf.readUnsignedShort(); // idleCount
+ buf.readUnsignedShort(); // idleTime in seconds
position.set(Position.KEY_DISTANCE, buf.readUnsignedInt());
- position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt());
+ position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt());
// Parse GPRMC
int end = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) '*');