aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/L100ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/L100ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/L100ProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/L100ProtocolDecoder.java b/src/org/traccar/protocol/L100ProtocolDecoder.java
index c4a4c0d58..4d6b8f34b 100644
--- a/src/org/traccar/protocol/L100ProtocolDecoder.java
+++ b/src/org/traccar/protocol/L100ProtocolDecoder.java
@@ -40,6 +40,7 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder {
private static final Pattern PATTERN = new PatternBuilder()
.text("ATL")
+ .expression(",[^,]+,").optional()
.number("(d{15}),") // imei
.text("$GPRMC,")
.number("(dd)(dd)(dd)") // time (hhmmss.sss)
@@ -142,7 +143,7 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder {
} else {
return decodeObdLocation(channel, remoteAddress, sentence);
}
- } else if (sentence.startsWith("ATL,") || sentence.substring(0, 1).matches("[NPT]")) {
+ } else if (!sentence.contains("$GPRMC")) {
return decodeNew(channel, remoteAddress, sentence);
} else {
return decodeNormal(channel, remoteAddress, sentence);