diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-08-11 05:03:26 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-08-11 05:03:26 +1200 |
commit | 3562e0d927d539a1e9730c48ed376ee84ebc2b25 (patch) | |
tree | 19779517e1691fc92059be40d62fda81342f907c | |
parent | b82be4f9f3b4d1d6c345bc41d5c26aca03e369cb (diff) | |
download | trackermap-server-3562e0d927d539a1e9730c48ed376ee84ebc2b25.tar.gz trackermap-server-3562e0d927d539a1e9730c48ed376ee84ebc2b25.tar.bz2 trackermap-server-3562e0d927d539a1e9730c48ed376ee84ebc2b25.zip |
Fix GL300VC decoding issue
-rw-r--r-- | src/org/traccar/protocol/Gl200TextProtocolDecoder.java | 6 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java index 63adb1c70..37793a6ff 100644 --- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -76,7 +76,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { .number("(?:d),") // led .number("(?:d)?,") // gps on need .number("(?:d)?,") // gps antenna type - .number("(?:d),").optional() // gps antenna state + .number("(?:d)?,").optional() // gps antenna state .number("d{14},") // last fix time .groupBegin() .number("(d+),") // battery percentage @@ -388,10 +388,6 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { } private Object decodeInf(Channel channel, SocketAddress remoteAddress, String sentence) { - - org.traccar.helper.PatternUtil.MatchResult matchResult = - org.traccar.helper.PatternUtil.checkPattern(PATTERN_INF.pattern(), sentence); - Parser parser = new Parser(PATTERN_INF, sentence); Position position = initPosition(parser, channel, remoteAddress); if (position == null) { diff --git a/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java index 9e2571916..ac58049df 100644 --- a/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java @@ -10,7 +10,7 @@ public class Gl200TextProtocolDecoderTest extends ProtocolTest { Gl200TextProtocolDecoder decoder = new Gl200TextProtocolDecoder(new Gl200Protocol()); - verifyNull(decoder, buffer( + verifyAttributes(decoder, buffer( "+RESP:GTINF,280500,A1000043D20139,GL300VC,41,,31,0,0,,,3.87,0,1,1,,,20170802150751,70,,48.0,,,20170802112145,03AC$")); verifyAttributes(decoder, buffer( |