aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/M2mProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 13:20:46 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 13:20:46 +1300
commitd4dbf85d9536bfec85252a58fc552e2bad42ff17 (patch)
tree4a849426c2cd60538b152138b147abef47b40966 /src/org/traccar/protocol/M2mProtocolDecoder.java
parent9218bc65b9673b24d2866aae3d5bbe1a5388bab0 (diff)
downloadtrackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.gz
trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.bz2
trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.zip
Remove trailing whitespaces from code
Diffstat (limited to 'src/org/traccar/protocol/M2mProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/M2mProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/M2mProtocolDecoder.java b/src/org/traccar/protocol/M2mProtocolDecoder.java
index 4f50c0411..6e57b5766 100644
--- a/src/org/traccar/protocol/M2mProtocolDecoder.java
+++ b/src/org/traccar/protocol/M2mProtocolDecoder.java
@@ -16,7 +16,7 @@
package org.traccar.protocol;
import java.net.SocketAddress;
-import java.util.Calendar;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -31,7 +31,7 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
public M2mProtocolDecoder(M2mProtocol protocol) {
super(protocol);
}
-
+
private boolean firstPacket = true;
@Override
@@ -50,7 +50,7 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
}
if (firstPacket) {
-
+
firstPacket = false;
// Read IMEI
@@ -67,7 +67,7 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
identify(imei.toString(), channel);
} else if (hasDeviceId()) {
-
+
// Create new position
Position position = new Position();
position.setProtocol(getProtocolName());
@@ -83,7 +83,7 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
time.set(Calendar.MINUTE, buf.readUnsignedByte() & 0x7f);
time.set(Calendar.SECOND, buf.readUnsignedByte() & 0x7f);
position.setTime(time.getTime());
-
+
// Location
int degrees = buf.readUnsignedByte();
double latitude = buf.readUnsignedByte();
@@ -100,14 +100,14 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
longitude += buf.readUnsignedByte() / 10000.0;
longitude /= 60;
longitude += degrees;
-
+
if ((b & 0x80) != 0) {
longitude = -longitude;
}
if ((b & 0x40) != 0) {
latitude = -latitude;
}
-
+
position.setLatitude(latitude);
position.setLongitude(longitude);
position.setSpeed(buf.readUnsignedByte());