aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java4
-rw-r--r--test/org/traccar/protocol/Gt06ProtocolDecoderTest.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 2c1468250..0fdd5ba10 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -630,6 +630,10 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShort();
}
+ if (type == MSG_GPS_LBS_STATUS_3) {
+ position.set(Position.KEY_GEOFENCE, buf.readUnsignedByte());
+ }
+
sendResponse(channel, false, type, null);
return position;
diff --git a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index 7f191d664..50fdd6cba 100644
--- a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -19,8 +19,8 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
verifyAttributes(decoder, binary(
"78780B23C00122040001000818720D0A"));
- /*verifyNotNull(decoder, binary(
- "78782727110c070f1a338000000000000000000004002d81360104cb8a00bef30004030c02ff0004f4d20d0a"));*/
+ verifyNotNull(decoder, binary(
+ "78782727110c0b0e170f850450059107f461ae001c7e0a81360104cb8a00bef32806030c02ff000316b10d0a"));
verifyNotNull(decoder, binary(
"78782322110c070f1b0270000000000000000000040081360104cb8a00bef3000000000523030d0a"));