aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-09 10:26:44 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-09 10:26:44 -0700
commiteec839e7f47843629b4c730c765bb7605f50532e (patch)
treebc1065245d52364e48953d811b79d1cf047f3e8b /src/main/java
parent54d7f988b449fabbbd10fb123d63502d2427b43b (diff)
downloadtrackermap-server-eec839e7f47843629b4c730c765bb7605f50532e.tar.gz
trackermap-server-eec839e7f47843629b4c730c765bb7605f50532e.tar.bz2
trackermap-server-eec839e7f47843629b4c730c765bb7605f50532e.zip
Support SR411 mini variant
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index 63210b2fa..b65e4a4b8 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -112,6 +112,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
private enum Variant {
VXT01,
WANWAY_S20,
+ SR411_MINI,
GT06E_CARD,
BENWAY,
S5,
@@ -646,6 +647,18 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
return position;
+ } else if (type == MSG_LBS_MULTIPLE_3 && variant == Variant.SR411_MINI) {
+
+ decodeGps(position, buf, false, deviceSession.get(DeviceSession.KEY_TIMEZONE));
+
+ decodeLbs(position, buf, type, false);
+
+ position.set(Position.KEY_IGNITION, buf.readUnsignedByte() > 0);
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.01);
+
+ return position;
+
} else if (type == MSG_LBS_MULTIPLE_1 || type == MSG_LBS_MULTIPLE_2 || type == MSG_LBS_MULTIPLE_3
|| type == MSG_LBS_EXTEND || type == MSG_LBS_WIFI || type == MSG_LBS_2
|| type == MSG_WIFI_3 || type == MSG_WIFI_5) {
@@ -1323,6 +1336,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
variant = Variant.VXT01;
} else if (header == 0x7878 && type == MSG_LBS_MULTIPLE_3 && length == 0x31) {
variant = Variant.WANWAY_S20;
+ } else if (header == 0x7878 && type == MSG_LBS_MULTIPLE_3 && length == 0x2e) {
+ variant = Variant.SR411_MINI;
} else if (header == 0x7878 && type == MSG_GPS_LBS_1 && length >= 0x71) {
variant = Variant.GT06E_CARD;
} else if (header == 0x7878 && type == MSG_GPS_LBS_1 && length == 0x21) {