aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CastelProtocolDecoder.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/CastelProtocolDecoder.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/CastelProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index 95862cc9a..bd20def8b 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -86,9 +86,9 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
int version = buf.readUnsignedByte();
ChannelBuffer id = buf.readBytes(20);
int type = ChannelBuffers.swapShort(buf.readShort());
-
+
if (type == MSG_HEARTBEAT) {
-
+
if (channel != null) {
ChannelBuffer response = ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN, 31);
response.writeByte(0x40); response.writeByte(0x40);
@@ -107,7 +107,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
type == MSG_GPS ||
type == MSG_ALARM ||
type == MSG_CURRENT_LOCATION) {
-
+
if (!identify(id.toString(Charset.defaultCharset()).trim(), channel, remoteAddress)) {
return null;
@@ -128,7 +128,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
response.writeByte(0x0D); response.writeByte(0x0A);
channel.write(response, remoteAddress);
}
-
+
}
if (type == MSG_GPS) {
@@ -138,7 +138,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
} else if (type == MSG_CURRENT_LOCATION) {
buf.readUnsignedShort();
}
-
+
buf.readUnsignedInt(); // ACC ON time
buf.readUnsignedInt(); // UTC time
long odometer = buf.readUnsignedInt();
@@ -147,7 +147,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShort(); // current fuel consumption
long status = buf.readUnsignedInt();
buf.skipBytes(8);
-
+
int count = buf.readUnsignedByte();
List<Position> positions = new LinkedList<>();
@@ -184,7 +184,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
return position;
}
-
+
return null;
}