aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-10-11 22:54:11 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-10-11 22:54:11 -0700
commitd6d8a33bd28a5e9c2e712f0a2f7041cb681a28d7 (patch)
tree252f53c9a33a8810c4211f6be77d837f3be08615 /src/main/java/org/traccar
parentaeb560b9eb988960e2964c4e329899723dd70891 (diff)
downloadtrackermap-server-d6d8a33bd28a5e9c2e712f0a2f7041cb681a28d7.tar.gz
trackermap-server-d6d8a33bd28a5e9c2e712f0a2f7041cb681a28d7.tar.bz2
trackermap-server-d6d8a33bd28a5e9c2e712f0a2f7041cb681a28d7.zip
Support JT701 devices
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java
index d745153a4..37c1674d4 100644
--- a/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2021 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -87,7 +87,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
}
static boolean isLongFormat(ByteBuf buf, int flagIndex) {
- return buf.getUnsignedByte(flagIndex) >> 4 == 0x7;
+ return buf.getUnsignedByte(flagIndex) >> 4 >= 7;
}
static void decodeBinaryLocation(ByteBuf buf, Position position) {
@@ -176,7 +176,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
cellTower.setSignalStrength((int) buf.readUnsignedByte());
position.setNetwork(new Network(cellTower));
- if (protocolVersion == 0x17) {
+ if (protocolVersion == 0x17 || protocolVersion == 0x19) {
buf.readUnsignedByte(); // geofence id
buf.skipBytes(3); // reserved
buf.skipBytes(buf.readableBytes() - 1);