diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-09 22:33:56 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-09 22:33:56 +1300 |
commit | 30cf4d484307ad89ce538bae36c47c91eb430536 (patch) | |
tree | 78caf275ff46530c53d8d1ccb89092aea00f23b4 /src/org/traccar/protocol/WialonProtocolDecoder.java | |
parent | 9e569d3f839838f84f46e164660f294e9d4ca709 (diff) | |
download | trackermap-server-30cf4d484307ad89ce538bae36c47c91eb430536.tar.gz trackermap-server-30cf4d484307ad89ce538bae36c47c91eb430536.tar.bz2 trackermap-server-30cf4d484307ad89ce538bae36c47c91eb430536.zip |
Fix some check style issues
Diffstat (limited to 'src/org/traccar/protocol/WialonProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/WialonProtocolDecoder.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java index 09e766e56..47158808c 100644 --- a/src/org/traccar/protocol/WialonProtocolDecoder.java +++ b/src/org/traccar/protocol/WialonProtocolDecoder.java @@ -169,21 +169,20 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; - // Detect device ID if (sentence.startsWith("#L#")) { + + // Detect device ID String imei = sentence.substring(3, sentence.indexOf(';')); if (identify(imei, channel)) { sendResponse(channel, "#AL#", 1); } - } - // Heartbeat - else if (sentence.startsWith("#P#")) { + } else if (sentence.startsWith("#P#")) { + + // Heartbeat sendResponse(channel, "#AP#", null); - } - // Parse message - else if (sentence.startsWith("#SD#") || sentence.startsWith("#D#")) { + } else if (sentence.startsWith("#SD#") || sentence.startsWith("#D#")) { Position position = decodePosition( sentence.substring(sentence.indexOf('#', 1) + 1)); @@ -192,9 +191,8 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder { sendResponse(channel, "#AD#", 1); return position; } - } - else if (sentence.startsWith("#B#")) { + } else if (sentence.startsWith("#B#")) { String[] messages = sentence.substring(sentence.indexOf('#', 1) + 1).split("\\|"); List<Position> positions = new LinkedList<>(); |