aboutsummaryrefslogtreecommitdiff
path: root/src/net/sourceforge/opentracking/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2011-06-16 07:56:59 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2011-06-16 07:56:59 +0000
commit7bc80dc78894b2cbe241fcaea2838673150fcef1 (patch)
treedd5893fb7325f2e3966297dc60c01ca99e103f47 /src/net/sourceforge/opentracking/protocol
parentdcbaac71303e606662c8274d5b936fd8323a01b0 (diff)
downloadtrackermap-server-7bc80dc78894b2cbe241fcaea2838673150fcef1.tar.gz
trackermap-server-7bc80dc78894b2cbe241fcaea2838673150fcef1.tar.bz2
trackermap-server-7bc80dc78894b2cbe241fcaea2838673150fcef1.zip
Diffstat (limited to 'src/net/sourceforge/opentracking/protocol')
-rw-r--r--src/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoder.java7
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);