aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java5
-rw-r--r--src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index 5db06fc41..383d4cb3a 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -828,7 +828,10 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
} else {
position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte() * 100 / 6);
position.set(Position.KEY_RSSI, buf.readUnsignedByte());
- position.set(Position.KEY_ALARM, decodeAlarm(buf.readUnsignedByte()));
+ short alarmExtension = buf.readUnsignedByte();
+ if (variant != Variant.VXT01) {
+ position.set(Position.KEY_ALARM, decodeAlarm(alarmExtension));
+ }
}
}
diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index 04f41a5ee..fac92d70f 100644
--- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -18,7 +18,7 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
"78780D01086471700328358100093F040D0A"));
verifyAttribute(decoder, binary(
- "78782416160501000221c0027c5e180c2b9c8d00150301cc002503002bde20050f01000004bd320d0a"),
+ "7878241617070a150e24ca01fba0040780e177005c0001720253360027db6204e40400004bf1e90d0a"),
Position.KEY_ALARM, Position.ALARM_SOS);
verifyAttribute(decoder, binary(