aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-12-12 17:39:10 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-12-12 17:39:10 -0800
commitd4f9561b978ea0410acc7a80a42137e13f06c846 (patch)
treeecd30b949245947d0337b6a09f519e0759311c66 /src/main/java/org/traccar/protocol
parent825cafeac2d43dd4410cd1393cbaf62c953fb287 (diff)
downloadtrackermap-server-d4f9561b978ea0410acc7a80a42137e13f06c846.tar.gz
trackermap-server-d4f9561b978ea0410acc7a80a42137e13f06c846.tar.bz2
trackermap-server-d4f9561b978ea0410acc7a80a42137e13f06c846.zip
Handle digital inputs
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java8
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++) {