aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-11 23:46:18 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-05-11 23:46:35 +1200
commitb5a311cad65f3be723981e9c338fadc33c20bcf6 (patch)
tree27de1817ea0c48fe59eca2dfad184ba032f6d3e2
parent35dd7b42b29c5898a42b77bdc3fa71676bb77611 (diff)
downloadtraccar-server-b5a311cad65f3be723981e9c338fadc33c20bcf6.tar.gz
traccar-server-b5a311cad65f3be723981e9c338fadc33c20bcf6.tar.bz2
traccar-server-b5a311cad65f3be723981e9c338fadc33c20bcf6.zip
Add minifinder GSM location flag
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
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);