aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-26 19:41:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-26 19:41:04 +1300
commit4fced732754e221871d52bef179d8962661f1835 (patch)
tree8a5e7e0b43620d62a0db6a749824351721e71feb /src/org
parentfbba01063cf4f79d83d58700f1e19486c8b26f16 (diff)
downloadtraccar-server-4fced732754e221871d52bef179d8962661f1835.tar.gz
traccar-server-4fced732754e221871d52bef179d8962661f1835.tar.bz2
traccar-server-4fced732754e221871d52bef179d8962661f1835.zip
Add GpsGate version check (fix #145)
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/GpsGateProtocolDecoder.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
index f755a4ce5..ab9a8a872 100644
--- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java
+++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
@@ -87,8 +87,13 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder {
}
}
+ // Protocol version check
+ else if (sentence.startsWith("$FRVER,")) {
+ send(channel, "$FRVER,1,1,GpsGate Server 1.0");
+ }
+
// Process data
- else if (sentence.contains("$GPRMC") && deviceId != null) {
+ else if (sentence.startsWith("$GPRMC,") && deviceId != null) {
// Parse message
Matcher parser = pattern.matcher(sentence);