aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
index 410477d19..a6daa141a 100644
--- a/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
@@ -62,9 +62,10 @@ public class Gl200ProtocolDecoder extends OneToOneDecoder {
"\\d{6}," + // Protocol version
"(\\d{15})," + // IMEI
"[^,]*," + // Device name
- "\\d," + // Report ID
- "\\d," + // Report type
- "\\d*," + // Number
+ "(?:(?:\\d," + // Report ID / Geo mode
+ "\\d*," + // Report type / Geo radius
+ "\\d*)|" + // Number / Geo check interval
+ "(?:[^,]*))," + // Call number
"(\\d*)," + // GPS accuracy
"(\\d+.\\d)," + // Speed
"(\\d+)," + // Course
@@ -73,7 +74,7 @@ public class Gl200ProtocolDecoder extends OneToOneDecoder {
"(-?\\d+.\\d+)," + // Latitude
"(\\d{4})(\\d{2})(\\d{2})" + // Date (YYYYMMDD)
"(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS)
- "[^$]*");
+ ".*");
/**
* Decode message
@@ -83,7 +84,7 @@ public class Gl200ProtocolDecoder extends OneToOneDecoder {
throws Exception {
String sentence = (String) msg;
-
+
// Parse message
Matcher parser = pattern.matcher(sentence);
if (!parser.matches()) {