diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-10-26 04:44:55 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-10-26 04:44:55 +1300 |
commit | 80e7a43412a72f0189c11baac102af7a335de09b (patch) | |
tree | 30ef3511185479412f425f13f8fa2e469e86ab67 /src | |
parent | 0a17cc5b40a2e01d215e6d39eaee1fa5c8f06aac (diff) | |
download | trackermap-server-80e7a43412a72f0189c11baac102af7a335de09b.tar.gz trackermap-server-80e7a43412a72f0189c11baac102af7a335de09b.tar.bz2 trackermap-server-80e7a43412a72f0189c11baac102af7a335de09b.zip |
Add support for AB and AC types
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index bfc1973f8..a3e8c9921 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -131,7 +131,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN4 = new PatternBuilder() .text("$$") // header .number("dddd") // length - .text("AA") // type + .expression("A[ABC]") // type .number("(d+)|") // imei .number("(x{8})") // status .number("(dd)(dd)(dd)") // date (yymmdd) @@ -313,7 +313,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; Pattern pattern = PATTERN3; - if (sentence.indexOf("AA") == 6) { + if (sentence.indexOf("A") == 6) { pattern = PATTERN4; } else if (sentence.contains("$GPRMC")) { pattern = PATTERN1; |