aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-22 08:27:32 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-22 08:27:32 +1300
commit3d7d201b33081ae08a6c6b95ba339f34cc6961c9 (patch)
treeb4dbe8d83359ea9ec21d75fd442e7d3f299dd379
parent8d6c4e2747c08180fef6f1de0b1207c9a6fbcdb1 (diff)
downloadtrackermap-server-3d7d201b33081ae08a6c6b95ba339f34cc6961c9.tar.gz
trackermap-server-3d7d201b33081ae08a6c6b95ba339f34cc6961c9.tar.bz2
trackermap-server-3d7d201b33081ae08a6c6b95ba339f34cc6961c9.zip
Fix TMG unit tests
-rw-r--r--src/org/traccar/protocol/TmgProtocolDecoder.java4
-rw-r--r--test/org/traccar/protocol/TmgProtocolDecoderTest.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/TmgProtocolDecoder.java b/src/org/traccar/protocol/TmgProtocolDecoder.java
index 1a03267b5..40ce04c5b 100644
--- a/src/org/traccar/protocol/TmgProtocolDecoder.java
+++ b/src/org/traccar/protocol/TmgProtocolDecoder.java
@@ -61,8 +61,8 @@ public class TmgProtocolDecoder extends BaseProtocolDecoder {
.expression("([01]+),") // input
.expression("([01]+),") // output
.expression("[01]+,") // temper status
- .number("(d+.?d*),") // adc1
- .number("(d+.?d*),") // adc2
+ .number("(d+.?d*)[^,]*,") // adc1
+ .number("(d+.?d*)[^,]*,") // adc2
.number("d+.?d*,") // trip meter
.expression("([^,]*),") // software version
.expression("([^,]*),").optional() // rfid
diff --git a/test/org/traccar/protocol/TmgProtocolDecoderTest.java b/test/org/traccar/protocol/TmgProtocolDecoderTest.java
index ba5ff4894..2fac25dab 100644
--- a/test/org/traccar/protocol/TmgProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TmgProtocolDecoderTest.java
@@ -38,7 +38,7 @@ public class TmgProtocolDecoderTest extends ProtocolTest {
"$nor,L,868324023777431,17012017,001523,4,2830.2939,N,07705.2527,E,0.0,50.96,236.5,1.05,11,21,IDEA CELLULAR L,18,DCDE,0,4.09,12.8,00000111,00000000,1111,00.0-00.0,00.0-0.0,3.59,01.02,#"));
verifyPosition(decoder, text(
- "$nor,L,869309999985699,24062015,094459,4,2826.1956,N,07659.7690,E,67.5,2.5,167,0.82,15,22,airtel,31,4441,1,4.1,12.7,00000011,00000011,1111,0.0,0.0, 21.3,SW00.01,#"));
+ "$nor,L,869309999985699,24062015,094459,4,2826.1956,N,07659.7690,E,67.5,2.5,167,0.82,15,22,airtel,31,4441,1,4.1,12.7,00000011,00000011,1111,0.0,0.0,21.3,SW00.01,#"));
}