aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-03-29 21:40:50 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-03-29 21:40:50 -0700
commit79a129dd6327d932133d6b9a50190d3f4927bff9 (patch)
treef983b7cbea59f317bc98087def3f2240c9afd76f
parent12ac2cf773b6fa621b48dc6177d8245e038a8918 (diff)
downloadtraccar-server-79a129dd6327d932133d6b9a50190d3f4927bff9.tar.gz
traccar-server-79a129dd6327d932133d6b9a50190d3f4927bff9.tar.bz2
traccar-server-79a129dd6327d932133d6b9a50190d3f4927bff9.zip
Additional A7W alarm
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java3
-rw-r--r--test/org/traccar/protocol/Gt06ProtocolDecoderTest.java5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 0e56c9949..1f8fb66dd 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -283,6 +283,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
case 4:
position.set(Position.KEY_ALARM, Position.ALARM_SOS);
break;
+ case 7:
+ position.set(Position.KEY_ALARM, Position.ALARM_REMOVING);
+ break;
default:
break;
}
diff --git a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index 56bb58921..a6008e682 100644
--- a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -2,6 +2,7 @@ package org.traccar.protocol;
import org.junit.Test;
import org.traccar.ProtocolTest;
+import org.traccar.model.Position;
public class Gt06ProtocolDecoderTest extends ProtocolTest {
@@ -19,6 +20,10 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, binary(
"787821121303120b2524c70138e363085b549003d43301940057d200cd52c000006aa1ca0d0a"));
+ verifyAttribute(decoder, binary(
+ "7878251613020C12141AC5027951430C2A16F60014000900000000001A00007C550300020002F1E70D0A"),
+ Position.KEY_ALARM, Position.ALARM_REMOVING);
+
verifyNotNull(decoder, binary(
"7878006919012105090303028f01007549e05a00bc9c5c5a007a8d1a5a0d0a"));