Skip to content

Commit

Permalink
Implement GK310 geofence support
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Dec 13, 2017
1 parent 44ecf67 commit 0c8bf88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/org/traccar/protocol/Gt06ProtocolDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,10 @@ private Object decodeBasicOther(Channel channel, ChannelBuffer buf,
buf.readUnsignedShort();
}

if (type == MSG_GPS_LBS_STATUS_3) {
position.set(Position.KEY_GEOFENCE, buf.readUnsignedByte());
}

sendResponse(channel, false, type, null);

return position;
Expand Down
4 changes: 2 additions & 2 deletions test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public void testDecode() throws Exception {
verifyAttributes(decoder, binary(
"78780B23C00122040001000818720D0A"));

/*verifyNotNull(decoder, binary(
"78782727110c070f1a338000000000000000000004002d81360104cb8a00bef30004030c02ff0004f4d20d0a"));*/
verifyNotNull(decoder, binary(
"78782727110c0b0e170f850450059107f461ae001c7e0a81360104cb8a00bef32806030c02ff000316b10d0a"));

verifyNotNull(decoder, binary(
"78782322110c070f1b0270000000000000000000040081360104cb8a00bef3000000000523030d0a"));
Expand Down

0 comments on commit 0c8bf88

Please sign in to comment.