aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index 7d0c58c57..1d77fb6cb 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -211,6 +211,9 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
.number("(dd)(dd)(dd)") // time
.text(",")
.any()
+ .number("(dddd)(dd)(dd)") // date
+ .number("(dd)(dd)(dd)").optional(2) // time
+ .text(",")
.number("(xxxx)") // count number
.text("$").optional()
.compile();
@@ -488,6 +491,15 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
.setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
position.setTime(dateBuilder.getDate());
+ if (parser.hasNext(6)) {
+ dateBuilder = new DateBuilder()
+ .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ if (!position.getOutdated() && position.getFixTime().after(dateBuilder.getDate())) {
+ position.setTime(dateBuilder.getDate());
+ }
+ }
+
return position;
}