From a68b4ab19873de65145772b408b4db75da25484a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 26 Feb 2019 19:17:15 -0800 Subject: Update ITS protocol --- src/org/traccar/protocol/ItsProtocolDecoder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/ItsProtocolDecoder.java b/src/org/traccar/protocol/ItsProtocolDecoder.java index e2b1dc238..a200ff8b7 100644 --- a/src/org/traccar/protocol/ItsProtocolDecoder.java +++ b/src/org/traccar/protocol/ItsProtocolDecoder.java @@ -36,22 +36,22 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN = new PatternBuilder() .expression("[^$]*") - .text("$,") - .expression("[^,]+,") // event + .text("$") + .expression(",?[^,]+,") // event .groupBegin() .expression("[^,]+,") // vendor .expression("[^,]+,") // firmware version - .groupEnd("?") .expression("[^,]+,") // type - .groupBegin() .number("d+,") .expression("[LH],") // history - .groupEnd("?") + .or() + .expression("[^,]+,") // type + .groupEnd() .number("(d{15}),") // imei .groupBegin() .expression("(?:NM|SP),") // status .or() - .expression("[^,]+,") // vehicle registration + .expression("[^,]*,") // vehicle registration .number("([01]),") // valid .groupEnd() .number("(dd),?(dd),?(dddd),") // date (ddmmyyyy) -- cgit v1.2.3