diff options
author | jon-stumpf <jon.stumpf@gmail.com> | 2017-03-04 16:51:03 -0500 |
---|---|---|
committer | jon-stumpf <jon.stumpf@gmail.com> | 2017-03-04 17:04:29 -0500 |
commit | aa1668df74c2d3c9a5d624d571f95bc110ad5414 (patch) | |
tree | b5a01d1ac7580cdb8bd2169f2a95253dddce3dab /src/org/traccar | |
parent | 942a6e42ab3c86b95df64f7c6d4884f4a308bff1 (diff) | |
download | traccar-server-aa1668df74c2d3c9a5d624d571f95bc110ad5414.tar.gz traccar-server-aa1668df74c2d3c9a5d624d571f95bc110ad5414.tar.bz2 traccar-server-aa1668df74c2d3c9a5d624d571f95bc110ad5414.zip |
Recorded additional information in Aplicom protocol;
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/AplicomProtocolDecoder.java | 18 |
1 files 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()); } |