diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-14 07:23:08 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-14 07:23:08 +1300 |
commit | 0c8bf8867456c55231f2aabf36970504d4e8cab7 (patch) | |
tree | 23a0813b8e3f8a7eb19357cef18c3be77eeef0d8 | |
parent | 44ecf67fef0cce59430e6216fcd2dfa4d5c2bcbd (diff) | |
download | trackermap-server-0c8bf8867456c55231f2aabf36970504d4e8cab7.tar.gz trackermap-server-0c8bf8867456c55231f2aabf36970504d4e8cab7.tar.bz2 trackermap-server-0c8bf8867456c55231f2aabf36970504d4e8cab7.zip |
Implement GK310 geofence support
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gt06ProtocolDecoderTest.java | 4 |
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")); |