aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-11 21:11:18 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-02-11 21:11:18 -0500
commit99e806e515b2bbb59565f693aaf54b26d0ed7466 (patch)
treec8c2993c01747cf88c49d02c6e2361e535b931a1 /src/org
parent9c5e97ce6176850bf4a88e90f6d758055a28f60e (diff)
downloadtrackermap-server-99e806e515b2bbb59565f693aaf54b26d0ed7466.tar.gz
trackermap-server-99e806e515b2bbb59565f693aaf54b26d0ed7466.tar.bz2
trackermap-server-99e806e515b2bbb59565f693aaf54b26d0ed7466.zip
Fixed formatting in MiniFinder;
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
index 738fd57b4..62a4c48fb 100644
--- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
+++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
@@ -90,41 +90,41 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(0);
}
- int flags = parser.nextInt(16);
-
- position.setValid(BitUtil.check(flags, 0));
-
- if (BitUtil.check(flags, 2)) {
- position.set(Position.KEY_ALARM, Position.ALARM_FAULT);
- }
- if (BitUtil.check(flags, 6)) {
- position.set(Position.KEY_ALARM, Position.ALARM_SOS);
- }
- if (BitUtil.check(flags, 7)) {
- position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED);
- }
- if (BitUtil.check(flags, 8)) {
- position.set(Position.KEY_ALARM, Position.ALARM_FALL_DOWN);
- }
- if (BitUtil.check(flags, 9) || BitUtil.check(flags, 10) || BitUtil.check(flags, 11)) {
- position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE);
- }
- if (BitUtil.check(flags, 12)) {
- position.set(Position.KEY_ALARM, Position.ALARM_LOW_BATTERY);
- }
- if (BitUtil.check(flags, 15) || BitUtil.check(flags, 14)) {
- position.set(Position.KEY_ALARM, Position.ALARM_MOVEMENT);
- }
-
- position.set(Position.KEY_RSSI, BitUtil.between(flags, 16, 20));
- position.set(Position.KEY_CHARGE, BitUtil.check(flags, 22));
-
- position.setAltitude(parser.nextDouble());
-
- position.set(Position.KEY_BATTERY, parser.nextInt());
- position.set(Position.KEY_SATELLITES, parser.nextInt());
- position.set(Position.KEY_SATELLITES_VISIBLE, parser.nextInt());
- position.set(Position.KEY_HDOP, parser.nextDouble());
+ int flags = parser.nextInt(16);
+
+ position.setValid(BitUtil.check(flags, 0));
+
+ if (BitUtil.check(flags, 2)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_FAULT);
+ }
+ if (BitUtil.check(flags, 6)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_SOS);
+ }
+ if (BitUtil.check(flags, 7)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED);
+ }
+ if (BitUtil.check(flags, 8)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_FALL_DOWN);
+ }
+ if (BitUtil.check(flags, 9) || BitUtil.check(flags, 10) || BitUtil.check(flags, 11)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE);
+ }
+ if (BitUtil.check(flags, 12)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_LOW_BATTERY);
+ }
+ if (BitUtil.check(flags, 15) || BitUtil.check(flags, 14)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_MOVEMENT);
+ }
+
+ position.set(Position.KEY_RSSI, BitUtil.between(flags, 16, 20));
+ position.set(Position.KEY_CHARGE, BitUtil.check(flags, 22));
+
+ position.setAltitude(parser.nextDouble());
+
+ position.set(Position.KEY_BATTERY, parser.nextInt());
+ position.set(Position.KEY_SATELLITES, parser.nextInt());
+ position.set(Position.KEY_SATELLITES_VISIBLE, parser.nextInt());
+ position.set(Position.KEY_HDOP, parser.nextDouble());
return position;
}