From bbcfef7775798244b141441208063646d19474ba Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 15 Sep 2019 10:20:17 -0700 Subject: Update modular decoding --- src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index dc7a95955..6229e748e 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -988,7 +988,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_INDEX, buf.readUnsignedInt()); break; case 0x2a: - position.set(Position.KEY_INPUT, buf.readUnsignedByte()); + int input = buf.readUnsignedByte(); + position.set(Position.KEY_DOOR, BitUtil.to(input, 4)); + position.set("tamper", BitUtil.from(input, 4)); break; case 0x2b: int event = buf.readUnsignedByte(); -- cgit v1.2.3