From 0e050e0f85422377096abd0ee8e7deead693c41a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 25 May 2021 20:08:58 -0700 Subject: Decode ignition value --- src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java b/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java index 339eccb37..759f2cd6f 100644 --- a/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FlexibleReportProtocolDecoder.java @@ -145,7 +145,9 @@ public class FlexibleReportProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedByte(); // rssi } if (BitUtil.check(mask, 12)) { - position.set(Position.PREFIX_IO + 1, buf.readUnsignedByte()); + int inputs = buf.readUnsignedByte(); + position.set(Position.KEY_IGNITION, BitUtil.check(inputs, 0)); + position.set(Position.PREFIX_IO + 1, inputs); } if (BitUtil.check(mask, 13)) { position.set(Position.PREFIX_IO + 2, buf.readUnsignedByte()); -- cgit v1.2.3