From b5a311cad65f3be723981e9c338fadc33c20bcf6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 11 May 2017 23:46:18 +1200 Subject: Add minifinder GSM location flag --- src/org/traccar/protocol/MiniFinderProtocolDecoder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java index c3279da43..8bfb4fb36 100644 --- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java +++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java @@ -79,7 +79,10 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder { private void decodeFlags(Position position, int flags) { - position.setValid(BitUtil.check(flags, 0)); + position.setValid(BitUtil.to(flags, 2) > 0); + if (BitUtil.check(flags, 1)) { + position.set(Position.KEY_APPROXIMATE, true); + } if (BitUtil.check(flags, 2)) { position.set(Position.KEY_ALARM, Position.ALARM_FAULT); -- cgit v1.2.3