diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-04-04 14:41:42 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-04-04 14:41:42 -0700 |
commit | 719608b5553aceb4734b2d376382670049f87951 (patch) | |
tree | 66bca5ecec06ff199f0b913fa85fd1a5fb47274d /src/main/java/org/traccar | |
parent | 7b2c88d22efb7e6c5ec65b5c8823b5f55a5d3eb6 (diff) | |
download | trackermap-server-719608b5553aceb4734b2d376382670049f87951.tar.gz trackermap-server-719608b5553aceb4734b2d376382670049f87951.tar.bz2 trackermap-server-719608b5553aceb4734b2d376382670049f87951.zip |
Invert flag values
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java | 6 |
1 files 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); } |