From aa1668df74c2d3c9a5d624d571f95bc110ad5414 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Sat, 4 Mar 2017 16:51:03 -0500 Subject: Recorded additional information in Aplicom protocol; --- src/org/traccar/protocol/AplicomProtocolDecoder.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java index d7f77a40e..f98ca61a9 100644 --- a/src/org/traccar/protocol/AplicomProtocolDecoder.java +++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java @@ -437,13 +437,13 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { } position.set(Position.KEY_VERSION_FW, buf.readUnsignedByte()); // version - buf.readUnsignedShort(); // event - buf.readUnsignedByte(); // data validity - buf.readUnsignedByte(); // towed + position.set(Position.KEY_EVENT, buf.readUnsignedShort()); // event + position.set("dataValidity", buf.readUnsignedByte()); // data validity + position.set("towed", buf.readUnsignedByte()); // towed buf.readUnsignedShort(); // length while (buf.readableBytes() > 0) { - buf.readUnsignedByte(); // towed position + position.set("towedPosition", buf.readUnsignedByte()); int type = buf.readUnsignedByte(); int length = buf.readUnsignedByte(); @@ -526,7 +526,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { if ((selector & 0x0020) != 0) { position.set(Position.KEY_HOURS, buf.readUnsignedInt()); position.set("serviceDistance", buf.readInt()); - buf.readUnsignedByte(); // driver activity + position.set("driverActivity", buf.readUnsignedByte()); position.set(Position.KEY_THROTTLE, buf.readUnsignedByte()); position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedByte()); } @@ -547,10 +547,10 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { } if ((selector & 0x0200) != 0) { - buf.readUnsignedByte(); // tachograph based speed - buf.readUnsignedByte(); // driver 1 state - buf.readUnsignedByte(); // driver 2 state - buf.readUnsignedByte(); // tachograph status + position.set("tachographSpeed", buf.readUnsignedByte()); + position.set("driver1State", buf.readUnsignedByte()); + position.set("driver2State", buf.readUnsignedByte()); + position.set("tachographStatus", buf.readUnsignedByte()); position.set("overspeedCount", buf.readUnsignedByte()); } -- cgit v1.2.3