From 18513d7949a2be933541c45728a1d466be2b50a2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 19 Sep 2022 17:23:36 -0700 Subject: Decode TR08X tampering alarm --- src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 1 + src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java | 4 ++++ 2 files changed, 5 insertions(+) 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 @@ -17,6 +17,10 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest { verifyNull(decoder, binary( "78780D01086471700328358100093F040D0A")); + verifyAttribute(decoder, binary( + "78782526160913063918c002780fab0c44750f00040008027f14084c0038420600030c020007398e0d0a"), + Position.KEY_ALARM, Position.ALARM_TAMPERING); + verifyAttribute(decoder, binary( "7979000d940516090908081c030defbd2d0d0a"), Position.KEY_DOOR, true); -- cgit v1.2.3