From d4f9561b978ea0410acc7a80a42137e13f06c846 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 12 Dec 2020 17:39:10 -0800 Subject: Handle digital inputs --- src/main/java/org/traccar/protocol/T800xProtocolDecoder.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java index bbf52bd5f..0c75a8997 100644 --- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java @@ -235,9 +235,11 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder { int io = buf.readUnsignedShort(); position.set(Position.KEY_IGNITION, BitUtil.check(io, 14)); position.set("ac", BitUtil.check(io, 13)); - for (int i = 0; i <= 2; i++) { - position.set(Position.PREFIX_OUT + (i + 1), BitUtil.check(io, 7 + i)); - } + position.set(Position.PREFIX_IN + 3, BitUtil.check(io, 12)); + position.set(Position.PREFIX_IN + 4, BitUtil.check(io, 11)); + position.set(Position.PREFIX_OUT + 1, BitUtil.check(io, 7)); + position.set(Position.PREFIX_OUT + 2, BitUtil.check(io, 8)); + position.set(Position.PREFIX_OUT + 3, BitUtil.check(io, 9)); if (header != 0x2626) { for (int i = 1; i <= 2; i++) { -- cgit v1.2.3