aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Gl200TextProtocolDecoder.java6
-rw-r--r--test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java2
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(