aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-07-24 07:26:18 -0700
committerAnton Tananaev <anton@traccar.org>2023-07-24 07:26:18 -0700
commit6e5481ebb1858726604706d011e5c5f509ac5306 (patch)
tree63e06d0bb9918f5f5601325e13f4d523e6e32e11
parentfc3c3ee38bdfd51ed1f56488661becffecceb3ef (diff)
downloadtrackermap-server-6e5481ebb1858726604706d011e5c5f509ac5306.tar.gz
trackermap-server-6e5481ebb1858726604706d011e5c5f509ac5306.tar.bz2
trackermap-server-6e5481ebb1858726604706d011e5c5f509ac5306.zip
Fix VL03 ignition decoding
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index f7cdd3920..d6d988423 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -345,7 +345,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
mnc = buf.readUnsignedByte();
}
int lac;
- if (type == MSG_LBS_ALARM) {
+ if (type == MSG_LBS_ALARM || type == MSG_GPS_LBS_7) {
lac = buf.readInt();
} else {
lac = buf.readUnsignedShort();
diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index cc71eb9bd..68579e815 100644
--- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -17,6 +17,10 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
verifyNull(decoder, binary(
"78780D01086471700328358100093F040D0A"));
+ verifyAttribute(decoder, binary(
+ "787829a01707150f2d0ecd01635100041e96d000087c02d4020000912e000000000718798d000e0006ed3ce50d0a"),
+ Position.KEY_IGNITION, false);
+
verifyNotNull(decoder, binary(
"787829a0170704112226cf0163fe7c0420f6f000091302d402000091290000000007186b8f01030001460d010d0a"));