diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-25 10:36:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-25 10:36:33 -0800 |
commit | 1ee9a1b00b5fc82ad493b48f818acbeedb8cff75 (patch) | |
tree | 5510a982581623cba20c1114841fc2c998a5634a | |
parent | e3aceea851c2c2b234b56cbef38e6c16f33726a0 (diff) | |
parent | 3ee1cb4560bc989275061badf9b916c0ed367ae1 (diff) | |
download | traccar-server-1ee9a1b00b5fc82ad493b48f818acbeedb8cff75.tar.gz traccar-server-1ee9a1b00b5fc82ad493b48f818acbeedb8cff75.tar.bz2 traccar-server-1ee9a1b00b5fc82ad493b48f818acbeedb8cff75.zip |
Merge pull request #4449 from lcsvcn/master
Update XRB28 regex pattern
-rw-r--r-- | src/main/java/org/traccar/protocol/Xrb28ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Xrb28ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Xrb28ProtocolDecoder.java index 938394d6b..69e5b7372 100644 --- a/src/main/java/org/traccar/protocol/Xrb28ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Xrb28ProtocolDecoder.java @@ -47,7 +47,7 @@ public class Xrb28ProtocolDecoder extends BaseProtocolDecoder { .expression("..,") // vendor .number("d{15},") // imei .expression("..,") // type - .number("0,") // reserved + .number("[01],") // reserved .number("(dd)(dd)(dd).d+,") // time (hhmmss) .expression("([AV]),") // validity .number("(dd)(dd.d+),") // latitude diff --git a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java index 0f15f31b4..20adacd6b 100644 --- a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java @@ -27,6 +27,9 @@ public class Xrb28ProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, text( "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,NG,868020030308430,D0,1,020455.00,A,2359.36129,S,04615.24677,W,12,0.72,201119,8.5,M,A#")); } |