aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-02-22 07:17:51 -0800
committerAnton Tananaev <anton@traccar.org>2024-02-22 07:17:51 -0800
commit2ab6df0a53e299f5cd6ef880c70054547d07fe42 (patch)
tree8f1e88400e483b04a6e8b11c240b7fbae6b58e67 /src/main/java/org
parent8cf3fcd643faebd9cb0937bc1e8454a22ad8b137 (diff)
downloadtrackermap-server-2ab6df0a53e299f5cd6ef880c70054547d07fe42.tar.gz
trackermap-server-2ab6df0a53e299f5cd6ef880c70054547d07fe42.tar.bz2
trackermap-server-2ab6df0a53e299f5cd6ef880c70054547d07fe42.zip
Fix SL44/SL48 alarms decoding
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index 7ee47dd86..6c0380278 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2024 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.
@@ -344,7 +344,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
int mcc = buf.readUnsignedShort();
int mnc;
- if (BitUtil.check(mcc, 15) || type == MSG_GPS_LBS_6) {
+ if (BitUtil.check(mcc, 15) || type == MSG_GPS_LBS_6 || variant == Variant.SL4X) {
mnc = buf.readUnsignedShort();
} else {
mnc = buf.readUnsignedByte();
@@ -441,15 +441,18 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
return Position.ALARM_REMOVING;
case 0x23:
return Position.ALARM_FALL_DOWN;
+ case 0x28:
+ return Position.ALARM_BRAKING;
case 0x29:
return Position.ALARM_ACCELERATION;
- case 0x30:
- return Position.ALARM_BRAKING;
case 0x2A:
case 0x2B:
+ case 0x2E:
return Position.ALARM_CORNERING;
case 0x2C:
return Position.ALARM_ACCIDENT;
+ case 0x30:
+ return Position.ALARM_JAMMING;
default:
return null;
}
@@ -1477,6 +1480,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
variant = Variant.JC400;
} else if (header == 0x7878 && type == MSG_LBS_3 && length == 0x37) {
variant = Variant.SL4X;
+ } else if (header == 0x7878 && type == MSG_GPS_LBS_STATUS_4 && length == 0x27) {
+ variant = Variant.SL4X;
} else if (header == 0x7878 && type == MSG_GPS_LBS_2 && length == 0x2f) {
variant = Variant.SEEWORLD;
} else if (header == 0x7878 && type == MSG_GPS_LBS_STATUS_1 && length == 0x26) {