diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-16 05:42:30 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-16 05:42:30 +1300 |
commit | 7446d4984a81b7298b390803cdf141f0d4e7cb8a (patch) | |
tree | 35268fb7e8df20bea080b5146d5f9c021aad6c61 | |
parent | 37a023ca4db10bc48fcc9eca9daddcf8d2701ef9 (diff) | |
download | trackermap-server-7446d4984a81b7298b390803cdf141f0d4e7cb8a.tar.gz trackermap-server-7446d4984a81b7298b390803cdf141f0d4e7cb8a.tar.bz2 trackermap-server-7446d4984a81b7298b390803cdf141f0d4e7cb8a.zip |
Fix Aplicom F decoding
-rw-r--r-- | src/org/traccar/protocol/AplicomProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/AplicomProtocolDecoderTest.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java index c07a656b3..03d7dbd6b 100644 --- a/src/org/traccar/protocol/AplicomProtocolDecoder.java +++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java @@ -503,8 +503,6 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { getLastLocation(position, null); - buf.readUnsignedShort(); // event - if ((selector & 0x0004) != 0) { buf.skipBytes(4); // snapshot time } diff --git a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java index 38ac1c43f..70e4e3e36 100644 --- a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class AplicomProtocolDecoderTest extends ProtocolTest { AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new AplicomProtocol());
verifyAttributes(decoder, binary(
+ "46c30144f667c1711f00340007ff750058b8f77701037c06b8000000330033000000000b760000425e0100640000b3a90185d5823155000131070204000219641004"));
+
+ verifyAttributes(decoder, binary(
"46c30144f667c1711f00340007ff75005891601401025707b50236003b003b003500000a9300006bd50100640000a5250167d2f9034c01010107020400021a901004"));
verifyAttributes(decoder, binary(
|