From 3a4757af42f4a7382b1b70cf4768023152238b32 Mon Sep 17 00:00:00 2001 From: Yuriy Piskarev Date: Mon, 28 Mar 2022 21:21:21 +0300 Subject: - replacing expression with BitUtil; --- src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java index df53d7c3d..37729236e 100644 --- a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java @@ -211,7 +211,7 @@ public class NavtelecomProtocolDecoder extends BaseProtocolDecoder { case 8: value = buf.readUnsignedByte(); position.setValid(BitUtil.check(value, 1)); - position.set(Position.KEY_SATELLITES, ((value & 0b11111100) >> 2)); + position.set(Position.KEY_SATELLITES, BitUtil.from(value, 2)); break; case 9: position.setFixTime(new Date(buf.readUnsignedIntLE() * 1000)); -- cgit v1.2.3