aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-01-03 16:38:22 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-01-03 16:38:22 -0800
commiteea01d00aad283bf505262b3c462dc7b88011fae (patch)
treed9d66e52b6dbda88e9beb97a82d96ca2e0a098bf /src/org
parente4e06e879652d8c61606843e3f7959ae5a1ec2a2 (diff)
downloadtraccar-server-eea01d00aad283bf505262b3c462dc7b88011fae.tar.gz
traccar-server-eea01d00aad283bf505262b3c462dc7b88011fae.tar.bz2
traccar-server-eea01d00aad283bf505262b3c462dc7b88011fae.zip
Support alternative Atlanta L100 format
Diffstat (limited to 'src/org')
-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);