aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-19 17:23:36 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-19 17:23:36 -0700
commit18513d7949a2be933541c45728a1d466be2b50a2 (patch)
tree2a93261432b4ad8476830af7c309dd4c40d9c7ea
parent5612d29b74a1c5ded13955565cf1b48f2307813c (diff)
downloadtrackermap-server-18513d7949a2be933541c45728a1d466be2b50a2.tar.gz
trackermap-server-18513d7949a2be933541c45728a1d466be2b50a2.tar.bz2
trackermap-server-18513d7949a2be933541c45728a1d466be2b50a2.zip
Decode TR08X tampering alarm
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java1
-rw-r--r--src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index 7eeee5efb..a93c11cbc 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -410,6 +410,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
return Position.ALARM_LOW_BATTERY;
case 0x11:
return Position.ALARM_POWER_OFF;
+ case 0x0C:
case 0x13:
case 0x25:
return Position.ALARM_TAMPERING;
diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index 1570dcf32..ebda38823 100644
--- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -18,6 +18,10 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
"78780D01086471700328358100093F040D0A"));
verifyAttribute(decoder, binary(
+ "78782526160913063918c002780fab0c44750f00040008027f14084c0038420600030c020007398e0d0a"),
+ Position.KEY_ALARM, Position.ALARM_TAMPERING);
+
+ verifyAttribute(decoder, binary(
"7979000d940516090908081c030defbd2d0d0a"),
Position.KEY_DOOR, true);