From d4dbf85d9536bfec85252a58fc552e2bad42ff17 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 4 Oct 2015 13:20:46 +1300 Subject: Remove trailing whitespaces from code --- src/org/traccar/protocol/BoxProtocolDecoder.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/org/traccar/protocol/BoxProtocolDecoder.java') 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; } -- cgit v1.2.3