diff options
Diffstat (limited to 'src/org/traccar/protocol/Pt502ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Pt502ProtocolDecoder.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java index 7dc4fbe5e..24dc2094f 100644 --- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java +++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java @@ -91,10 +91,8 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder { String type = parser.next();
- if (type.startsWith("PHO")) {
- if (channel != null) {
- channel.write("#PHD0," + type.substring(3) + "\r\n");
- }
+ if (type.startsWith("PHO") && channel != null) {
+ channel.write("#PHD0," + type.substring(3) + "\r\n");
}
position.set(Position.KEY_ALARM, decodeAlarm(type));
|