aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/YwtProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/YwtProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/YwtProtocolDecoder.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/YwtProtocolDecoder.java b/src/org/traccar/protocol/YwtProtocolDecoder.java
index be76d1d86..d4e402185 100644
--- a/src/org/traccar/protocol/YwtProtocolDecoder.java
+++ b/src/org/traccar/protocol/YwtProtocolDecoder.java
@@ -136,11 +136,10 @@ public class YwtProtocolDecoder extends BaseProtocolDecoder {
position.set(Event.KEY_STATUS, parser.group(index++));
// Send response
- if (type.equals("KP") || type.equals("EP") || type.equals("EP")) {
- if (channel != null) {
- channel.write("%AT+" + type + "=" + reportId + "\r\n");
- }
+ if ((type.equals("KP") || type.equals("EP") || type.equals("EP")) && channel != null) {
+ channel.write("%AT+" + type + "=" + reportId + "\r\n");
}
+
return position;
}