aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-03-31 09:11:17 -0700
committerAnton Tananaev <anton@traccar.org>2022-03-31 09:11:17 -0700
commitb98bf59312c136aa4324e9e7bdbef0086067e5e7 (patch)
tree65612f9f8cae58b7329747c0aee06138e9c87c76
parent853df8c7ae682266714e6e0ee66095f718d42e0a (diff)
downloadtrackermap-server-b98bf59312c136aa4324e9e7bdbef0086067e5e7.tar.gz
trackermap-server-b98bf59312c136aa4324e9e7bdbef0086067e5e7.tar.bz2
trackermap-server-b98bf59312c136aa4324e9e7bdbef0086067e5e7.zip
Fix Navtelecom digital IO
-rw-r--r--src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
index 7d6991a2f..5fb3e771f 100644
--- a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
@@ -251,13 +251,13 @@ public class NavtelecomProtocolDecoder extends BaseProtocolDecoder {
case 29:
value = buf.readUnsignedByte();
for (int k = 0; k <= 7; k++) {
- position.set(Position.PREFIX_IN + (k + 1), BitUtil.check(value, k) ? 1 : 0);
+ position.set(Position.PREFIX_IN + (k + 1), BitUtil.check(value, k));
}
break;
case 31:
value = buf.readUnsignedByte();
for (int k = 0; k <= 3; k++) {
- position.set(Position.PREFIX_OUT + (k + 1), BitUtil.check(value, k) ? 1 : 0);
+ position.set(Position.PREFIX_OUT + (k + 1), BitUtil.check(value, k));
}
break;
case 33: