diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-25 15:30:25 +0400 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-25 15:30:25 +0400 |
commit | 8560d199a4440fb83ddbc46b81d0b0b0281d0385 (patch) | |
tree | 79a70cd66854a47cc63ec402e04b4ce39073445b | |
parent | 63e06bc37060861aabebf93723fc20318152f957 (diff) | |
download | trackermap-server-8560d199a4440fb83ddbc46b81d0b0b0281d0385.tar.gz trackermap-server-8560d199a4440fb83ddbc46b81d0b0b0281d0385.tar.bz2 trackermap-server-8560d199a4440fb83ddbc46b81d0b0b0281d0385.zip |
Handle MT600 Plus message format
-rw-r--r-- | src/org/traccar/protocol/Tlt2hProtocolDecoder.java | 3 | ||||
-rw-r--r-- | test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java index 73e28e17b..f67ff88db 100644 --- a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java +++ b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java @@ -37,8 +37,7 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN_HEADER = new PatternBuilder() .number("#(d+)#") // imei - .expression("[^#]*#") - .number("d+#") + .any() .expression("([^#]+)#") // status .number("d+") // number of records .compile(); diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java index 2f7f41724..83caae208 100644 --- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java @@ -10,7 +10,7 @@ public class Tlt2hProtocolDecoderTest extends ProtocolTest { Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(null); - verifyNull(decoder, text( + verifyPositions(decoder, text( "#867962040161955#MT600#0000#0#0#137#41#0#AUTO#1\r\n" + "#00019023402$GPRMC,084702.00,A,3228.6772,S,11545.9684,E,,159.80,251018,,,A*56\r\n")); |