diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-30 09:35:27 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-30 09:35:27 +1200 |
commit | e2e62cdab540c7b5c5b7614a7b80707a4ff72e1d (patch) | |
tree | 0512c9d1c6709ca7a415b38574233487a209aa38 | |
parent | 8e6e361eb0e1d4c92b99fa20a70f0fa7b296a466 (diff) | |
download | trackermap-server-e2e62cdab540c7b5c5b7614a7b80707a4ff72e1d.tar.gz trackermap-server-e2e62cdab540c7b5c5b7614a7b80707a4ff72e1d.tar.bz2 trackermap-server-e2e62cdab540c7b5c5b7614a7b80707a4ff72e1d.zip |
Fix TK102 regex pattern (fix #1184)
-rw-r--r-- | src/org/traccar/protocol/Tk102ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Tk102ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java index c1dcd9bd4..9eef7cc91 100644 --- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java @@ -42,7 +42,7 @@ public class Tk102ProtocolDecoder extends BaseProtocolDecoder { "([EW])" + "(\\d{3}\\.\\d{3})" + // Speed "(\\d{2})(\\d{2})(\\d{2})" + // Date (DDMMYY) - "\\d+\\)"); + "\\d+.*\\)\\]?"); @Override protected Object decode( diff --git a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java index 21a6e3010..7cdb48a9b 100644 --- a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java @@ -35,6 +35,9 @@ public class Tk102ProtocolDecoderTest extends ProtocolDecoderTest { verify(decoder.decode(null, null, "[;00000000106(ONE200834A5952.8114N01046.0832E003.93212071305010000)")); + verify(decoder.decode(null, null, + "[\u00930000000000F(ITV153047A1534.0805N03233.0888E000.00029041500000400&Wsz-wl001&B0000)]")); + } } |