aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/BoxProtocolDecoder.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/BoxProtocolDecoder.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/BoxProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/BoxProtocolDecoder.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java
index 3ec0dc9bd..2820bd826 100644
--- a/src/org/traccar/protocol/BoxProtocolDecoder.java
+++ b/src/org/traccar/protocol/BoxProtocolDecoder.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 java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,9 +53,9 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
throws Exception {
String sentence = (String) msg;
-
+
if (sentence.startsWith("H,")) {
-
+
int index = sentence.indexOf(',', 2) + 1;
String id = sentence.substring(index, sentence.indexOf(',', index));
identify(id, channel);
@@ -68,7 +68,7 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
}
}
-
+
else if (sentence.startsWith("L,") && hasDeviceId()) {
// Parse message
@@ -100,20 +100,20 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(Double.parseDouble(parser.group(index++)));
position.setSpeed(UnitsConverter.knotsFromKph(Double.parseDouble(parser.group(index++))));
position.setCourse(Double.parseDouble(parser.group(index++)));
-
+
// Distance
position.set(Event.KEY_ODOMETER, parser.group(index++));
-
+
// Event
position.set(Event.KEY_EVENT, parser.group(index++));
-
+
// Status
int status = Integer.parseInt(parser.group(index++));
position.setValid((status & 0x04) == 0);
position.set(Event.KEY_STATUS, status);
return position;
}
-
+
return null;
}