diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-05-30 06:27:22 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-05-30 06:27:22 +1200 |
commit | e3bd8d28436195efe640c4214028566bc2643db1 (patch) | |
tree | 2cdaa4f4067f93f44ad6325aa7b163cf9467cf71 | |
parent | f439d7b06285ce442cd721391aadede3ff6ac702 (diff) | |
download | trackermap-server-e3bd8d28436195efe640c4214028566bc2643db1.tar.gz trackermap-server-e3bd8d28436195efe640c4214028566bc2643db1.tar.bz2 trackermap-server-e3bd8d28436195efe640c4214028566bc2643db1.zip |
Support WP-30C protocol
-rw-r--r-- | src/org/traccar/protocol/L100ProtocolDecoder.java | 7 | ||||
-rw-r--r-- | test/org/traccar/protocol/L100ProtocolDecoderTest.java | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/L100ProtocolDecoder.java b/src/org/traccar/protocol/L100ProtocolDecoder.java index 1fe18ff5e..fe2c298e1 100644 --- a/src/org/traccar/protocol/L100ProtocolDecoder.java +++ b/src/org/traccar/protocol/L100ProtocolDecoder.java @@ -54,14 +54,15 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder { .number("(d+.?d*|N.C),") // adc .expression("[^,]*,") // reserved .expression("[^,]*,") // reserved - .number("(d+.d+),") // odometer - .number("(d+.d+),") // temperature - .number("(d+.d+),") // battery + .number("(d+.?d*),") // odometer + .number("(d+.?d*),") // temperature + .number("(d+.?d*),") // battery .number("(d+),") // rssi .number("(d+),") // mcc .number("(d+),") // mnc .number("(x+),") // lac .number("(x+)") // cid + .any() .text("ATL") .compile(); diff --git a/test/org/traccar/protocol/L100ProtocolDecoderTest.java b/test/org/traccar/protocol/L100ProtocolDecoderTest.java index 04d3f8b5b..1e48ecef5 100644 --- a/test/org/traccar/protocol/L100ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/L100ProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class L100ProtocolDecoderTest extends ProtocolTest { L100ProtocolDecoder decoder = new L100ProtocolDecoder(new L100Protocol()); verifyPosition(decoder, text( + "ATL861693039769518,$GPRMC,074930.000,A,2838.0112,N,07713.3602,E,0000,223.36,290518,,,A*7E,#01111011000100,0.012689,0,0,2.572415,0,4.015,22,404,4,88,3ad5,0,0.01,1.4_800F_VTS3D3_gen_peri_myn,,internet,00000000,ATL")); + + verifyPosition(decoder, text( "ATL867857039216564,$GPRMC,131101,A,2838.010010,N,7713.354980,E,0,0,240418,,,*09,#00011011000000,0,0,0,10.70,24.31,3.8,0,0,0,0,0ATL")); verifyPosition(decoder, text( |