aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt06ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-19 12:22:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-19 12:22:04 +1300
commit66f6f48f00f01600afb13395c8b8c1fe95254201 (patch)
tree3228c552d5bf52b77251929d95ad66b5fb6601be /src/org/traccar/protocol/Gt06ProtocolDecoder.java
parent43814126839b863ac73452d395a0ec5e0d817d46 (diff)
downloadtrackermap-server-66f6f48f00f01600afb13395c8b8c1fe95254201.tar.gz
trackermap-server-66f6f48f00f01600afb13395c8b8c1fe95254201.tar.bz2
trackermap-server-66f6f48f00f01600afb13395c8b8c1fe95254201.zip
Fix more check style issues
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 5b19db43b..e319d9e81 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -78,7 +78,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_COMMAND_1 = 0x81;
public static final int MSG_COMMAND_2 = 0x82;
- private final static Set<Integer> MESSAGES_SUPPORTED = new HashSet<>(Arrays.asList(
+ private static final Set<Integer> MESSAGES_SUPPORTED = new HashSet<>(Arrays.asList(
MSG_GPS,
MSG_GPS_LBS_1,
MSG_GPS_LBS_2,
@@ -88,14 +88,14 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
MSG_GPS_PHONE,
MSG_GPS_LBS_EXTEND));
- private final static Set<Integer> MESSAGES_LBS = new HashSet<>(Arrays.asList(
+ private static final Set<Integer> MESSAGES_LBS = new HashSet<>(Arrays.asList(
MSG_GPS_LBS_1,
MSG_GPS_LBS_2,
MSG_GPS_LBS_STATUS_1,
MSG_GPS_LBS_STATUS_2,
MSG_GPS_LBS_STATUS_3));
- private final static Set<Integer> MESSAGES_STATUS = new HashSet<>(Arrays.asList(
+ private static final Set<Integer> MESSAGES_STATUS = new HashSet<>(Arrays.asList(
MSG_GPS_LBS_STATUS_1,
MSG_GPS_LBS_STATUS_2,
MSG_GPS_LBS_STATUS_3));
@@ -184,8 +184,12 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
int union = buf.readUnsignedShort();
position.setCourse(union & 0b0000_0011_1111_1111);
position.setValid((union & 0b0001_0000_0000_0000) != 0);
- if ((union & 0b0000_0100_0000_0000) == 0) latitude = -latitude;
- if ((union & 0b0000_1000_0000_0000) != 0) longitude = -longitude;
+ if ((union & 0b0000_0100_0000_0000) == 0) {
+ latitude = -latitude;
+ }
+ if ((union & 0b0000_1000_0000_0000) != 0) {
+ longitude = -longitude;
+ }
position.setLatitude(latitude);
position.setLongitude(longitude);