From 719608b5553aceb4734b2d376382670049f87951 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 4 Apr 2020 14:41:42 -0700 Subject: Invert flag values --- src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java b/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java index a6aa44898..de23ea170 100644 --- a/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java @@ -142,9 +142,9 @@ public class GlobalstarProtocolDecoder extends BaseHttpProtocolDecoder { DataConverter.parseHex(xPath.evaluate("payload", node).substring(2))); int flags = buf.readUnsignedByte(); - position.set(Position.PREFIX_IN + 1, BitUtil.check(flags, 1)); - position.set(Position.PREFIX_IN + 2, BitUtil.check(flags, 2)); - position.set(Position.KEY_CHARGE, BitUtil.check(flags, 3)); + position.set(Position.PREFIX_IN + 1, !BitUtil.check(flags, 1)); + position.set(Position.PREFIX_IN + 2, !BitUtil.check(flags, 2)); + position.set(Position.KEY_CHARGE, !BitUtil.check(flags, 3)); if (BitUtil.check(flags, 4)) { position.set(Position.KEY_ALARM, Position.ALARM_VIBRATION); } -- cgit v1.2.3