aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java
diff options
context:
space:
mode:
authorStefan Clark <stefanclark@gmail.com>2022-07-25 13:52:06 +0000
committerStefan Clark <stefanclark@gmail.com>2022-07-25 13:52:06 +0000
commit1f0965d02081d0257a969927ba58de5b39e051bd (patch)
treee4d702e5dea5cfc13fc47101cc626b360c3258e7 /src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java
parent8b63ce5c51fca9462e0e561b8ce07ae49afce6f8 (diff)
downloadtrackermap-server-1f0965d02081d0257a969927ba58de5b39e051bd.tar.gz
trackermap-server-1f0965d02081d0257a969927ba58de5b39e051bd.tar.bz2
trackermap-server-1f0965d02081d0257a969927ba58de5b39e051bd.zip
Update Xexun2 Decoder - do not ACK a command ACK
Diffstat (limited to 'src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/Xexun2ProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
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<Integer> lengths = new ArrayList<>();
List<Position> positions = new ArrayList<>();