diff options
Diffstat (limited to 'src/net/sourceforge/opentracking/protocol/gps103')
-rw-r--r-- | src/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoder.java b/src/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoder.java index 30fdcb06f..92d54b551 100644 --- a/src/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoder.java +++ b/src/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoder.java @@ -80,10 +80,15 @@ public class Gps103ProtocolDecoder extends OneToOneDecoder { String sentence = (String) msg; - // Send response + // Send response #1 if (sentence.contains("##")) { channel.write("LOAD"); } + + // Send response #2 + if (sentence.length() == 15 && Character.isDigit(sentence.charAt(0))) { + channel.write("ON"); + } // Parse message Matcher parser = pattern.matcher(sentence); |