From eea01d00aad283bf505262b3c462dc7b88011fae Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 3 Jan 2019 16:38:22 -0800 Subject: Support alternative Atlanta L100 format --- src/org/traccar/protocol/L100ProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol') 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); -- cgit v1.2.3