From 1f0965d02081d0257a969927ba58de5b39e051bd Mon Sep 17 00:00:00 2001 From: Stefan Clark Date: Mon, 25 Jul 2022 13:52:06 +0000 Subject: Update Xexun2 Decoder - do not ACK a command ACK --- src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java index 28e7fbda3..bdeb0fa78 100644 --- a/src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java @@ -42,6 +42,7 @@ public class Xexun2ProtocolDecoder extends BaseProtocolDecoder { } public static final int MSG_POSITION = 0x14; + public static final int MSG_COMMAND = 0x07; private void sendResponse(Channel channel, int type, int index, ByteBuf imei) { if (channel != null) { @@ -99,12 +100,12 @@ public class Xexun2ProtocolDecoder extends BaseProtocolDecoder { return null; } - sendResponse(channel, type, index, imei); - buf.readUnsignedShort(); // attributes buf.readUnsignedShort(); // checksum if (type == MSG_POSITION) { + sendResponse(channel, type, index, imei); + List lengths = new ArrayList<>(); List positions = new ArrayList<>(); -- cgit v1.2.3