aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Avl301ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 23:11:23 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 23:11:23 +1300
commit398b705820109c1103d915a2fec81fcf70b032cf (patch)
tree659a0483eda19f9c91855197b70fd2a0bfb82a60 /src/org/traccar/protocol/Avl301ProtocolDecoder.java
parent2da5669f8bd3f734fa37626c892aebdff7268613 (diff)
downloadtrackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.tar.gz
trackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.tar.bz2
trackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.zip
Fix some check style issues
Diffstat (limited to 'src/org/traccar/protocol/Avl301ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Avl301ProtocolDecoder.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/Avl301ProtocolDecoder.java b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
index 1f1fdd6f8..f0ad97bf8 100644
--- a/src/org/traccar/protocol/Avl301ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
@@ -15,6 +15,9 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
+import java.util.Calendar;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
@@ -22,10 +25,6 @@ import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.net.SocketAddress;
-import java.util.Calendar;
-import java.util.TimeZone;
-
public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
public Avl301ProtocolDecoder(Avl301Protocol protocol) {
@@ -114,8 +113,12 @@ public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
int union = buf.readUnsignedShort();
position.setCourse(union & 0x03FF);
position.setValid((union & 0x1000) != 0);
- if ((union & 0x0400) != 0) latitude = -latitude;
- if ((union & 0x0800) != 0) longitude = -longitude;
+ if ((union & 0x0400) != 0) {
+ latitude = -latitude;
+ }
+ if ((union & 0x0800) != 0) {
+ longitude = -longitude;
+ }
position.setLatitude(latitude);
position.setLongitude(longitude);