From f26a894807be6c2ea06e28d3ce33d7aea34a1ade Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 5 Dec 2023 21:46:34 -0800 Subject: Additional Positrex parameters --- .../java/org/traccar/protocol/PositrexProtocolDecoder.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main/java/org/traccar/protocol') 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; } -- cgit v1.2.3