diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-12 17:39:10 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-12 17:39:10 -0800 |
commit | d4f9561b978ea0410acc7a80a42137e13f06c846 (patch) | |
tree | ecd30b949245947d0337b6a09f519e0759311c66 /src/main/java/org/traccar | |
parent | 825cafeac2d43dd4410cd1393cbaf62c953fb287 (diff) | |
download | traccar-server-d4f9561b978ea0410acc7a80a42137e13f06c846.tar.gz traccar-server-d4f9561b978ea0410acc7a80a42137e13f06c846.tar.bz2 traccar-server-d4f9561b978ea0410acc7a80a42137e13f06c846.zip |
Handle digital inputs
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/T800xProtocolDecoder.java | 8 |
1 files changed, 5 insertions, 3 deletions
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++) { |