From 7446d4984a81b7298b390803cdf141f0d4e7cb8a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 16 Mar 2017 05:42:30 +1300 Subject: Fix Aplicom F decoding --- src/org/traccar/protocol/AplicomProtocolDecoder.java | 2 -- 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 @@ -10,6 +10,9 @@ public class AplicomProtocolDecoderTest extends ProtocolTest { AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new AplicomProtocol()); + verifyAttributes(decoder, binary( + "46c30144f667c1711f00340007ff750058b8f77701037c06b8000000330033000000000b760000425e0100640000b3a90185d5823155000131070204000219641004")); + verifyAttributes(decoder, binary( "46c30144f667c1711f00340007ff75005891601401025707b50236003b003b003500000a9300006bd50100640000a5250167d2f9034c01010107020400021a901004")); -- cgit v1.2.3