aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/T55ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-09 22:33:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-09 22:33:56 +1300
commit30cf4d484307ad89ce538bae36c47c91eb430536 (patch)
tree78caf275ff46530c53d8d1ccb89092aea00f23b4 /src/org/traccar/protocol/T55ProtocolDecoder.java
parent9e569d3f839838f84f46e164660f294e9d4ca709 (diff)
downloadtrackermap-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/T55ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java38
1 files changed, 8 insertions, 30 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index da379ef58..fcb7d34ab 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -94,33 +94,17 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
sentence = sentence.substring(index);
}
- // Identification
if (sentence.startsWith("$PGID")) {
identify(sentence.substring(6, sentence.length() - 3), channel);
- }
-
- // Identification
- else if (sentence.startsWith("$PCPTI")) {
+ } else if (sentence.startsWith("$PCPTI")) {
identify(sentence.substring(7, sentence.indexOf(",", 7)), channel);
- }
-
- // Identification
- else if (sentence.startsWith("IMEI")) {
+ } else if (sentence.startsWith("IMEI")) {
identify(sentence.substring(5, sentence.length()), channel);
- }
-
- // Identification
- else if (sentence.startsWith("$GPFID")) {
+ } else if (sentence.startsWith("$GPFID")) {
identify(sentence.substring(6, sentence.length()), channel);
- }
-
- // Identification
- else if (Character.isDigit(sentence.charAt(0)) && sentence.length() == 15) {
+ } else if (Character.isDigit(sentence.charAt(0)) && sentence.length() == 15) {
identify(sentence, channel);
- }
-
- // Location
- else if (sentence.startsWith("$GPRMC") && hasDeviceId()) {
+ } else if (sentence.startsWith("$GPRMC") && hasDeviceId()) {
// Send response
if (channel != null) {
@@ -180,10 +164,8 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
time.set(Calendar.YEAR, 2000 + Integer.parseInt(parser.group(index++)));
position.setTime(time.getTime());
return position;
- }
- // Location
- else if (sentence.startsWith("$GPGGA") && hasDeviceId()) {
+ } else if (sentence.startsWith("$GPGGA") && hasDeviceId()) {
// Parse message
Matcher parser = PATTERN_GPGGA.matcher(sentence);
@@ -221,10 +203,8 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
if (parser.group(index++).compareTo("W") == 0) longitude = -longitude;
position.setLongitude(longitude);
return position;
- }
- // Location
- else if (sentence.startsWith("$GPRMA") && hasDeviceId()) {
+ } else if (sentence.startsWith("$GPRMA") && hasDeviceId()) {
// Parse message
Matcher parser = PATTERN_GPRMA.matcher(sentence);
@@ -269,10 +249,8 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(Double.parseDouble(course));
}
return position;
- }
- // Location
- else if (sentence.startsWith("$TRCCR") && hasDeviceId()) {
+ } else if (sentence.startsWith("$TRCCR") && hasDeviceId()) {
// Parse message
Matcher parser = PATTERN_TRCCR.matcher(sentence);