diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-06-07 09:57:37 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-06-07 09:57:37 -0700 |
commit | 2742be4523fab5b371ae5dc11f573c7064546a7f (patch) | |
tree | 4da0d374f74845e133e9d185def16c4f3adbf1bb | |
parent | 6aafe32539d7892cd25cf4c1d1a16597838a516f (diff) | |
download | trackermap-server-2742be4523fab5b371ae5dc11f573c7064546a7f.tar.gz trackermap-server-2742be4523fab5b371ae5dc11f573c7064546a7f.tar.bz2 trackermap-server-2742be4523fab5b371ae5dc11f573c7064546a7f.zip |
Support GV300N device
-rw-r--r-- | src/org/traccar/protocol/Gl200ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gl200ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index a6da38ef4..0927f53fd 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -312,7 +312,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN_BASIC = new PatternBuilder() .text("+").expression("(?:RESP|BUFF)").text(":") .expression("GT...,") - .number("(?:[0-9A-Z]{2}xxxx)?,") // protocol version + .number("(?:[0-9A-Z]{2}xxxx)?,").optional() // protocol version .number("(d{15}|x{14}),") // imei .any() .number("(d{1,2})?,") // hdop diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java index 5d6c2aca8..a36981294 100644 --- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class Gl200ProtocolDecoderTest extends ProtocolTest { Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol()); + verifyPosition(decoder, text( + "+RESP:GTTRI,862370030005908,1,0,99,1,0.0,354,18.5,18.821100,-34.084002,20170607152024,0655,0001,00DD,1CAE,00,0103010100,20170607172115,3E7D$")); + verifyPositions(decoder, text( "+RESP:GTERI,060800,861074023677175,,00000002,12351,10,1,1,0.0,0,2862.4,-78.467273,-0.164998,20170529181717,,,,,,0.0,00259:11:50,,,0,210104,2,1,28E17436060000E2,1,015F,0,20170529181723,2824$")); |