From b98bf59312c136aa4324e9e7bdbef0086067e5e7 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 31 Mar 2022 09:11:17 -0700 Subject: Fix Navtelecom digital IO --- src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') 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: -- cgit v1.2.3