aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/PositrexProtocolDecoder.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/PositrexProtocolDecoder.java b/src/main/java/org/traccar/protocol/PositrexProtocolDecoder.java
index ff4825e8d..82ae2c134 100644
--- a/src/main/java/org/traccar/protocol/PositrexProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/PositrexProtocolDecoder.java
@@ -95,6 +95,17 @@ public class PositrexProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
position.setCourse(buf.readUnsignedByte() * 2);
+ position.set(Position.PREFIX_IO, buf.readUnsignedByte());
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
+ buf.readUnsignedInt(); // report begin
+ buf.readUnsignedInt(); // report end
+ buf.readUnsignedInt(); // number of records
+
+ if (buf.isReadable()) {
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.01);
+ }
+
return position;
}