aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-01-11 17:00:02 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-01-11 17:00:02 +1300
commita52e44a9b102af054a281c7b5ee471e2a38a4753 (patch)
treee620118c533d212ccc1f1ff1e979de3d7e29110a
parente0f4cf776229c8f458c672618eb14ec055227978 (diff)
downloadtrackermap-server-a52e44a9b102af054a281c7b5ee471e2a38a4753.tar.gz
trackermap-server-a52e44a9b102af054a281c7b5ee471e2a38a4753.tar.bz2
trackermap-server-a52e44a9b102af054a281c7b5ee471e2a38a4753.zip
Fix new TRCCR format
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/T55ProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index f055ec240..3c4a9500b 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -78,7 +78,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
"(\\d+\\.\\d+)," + // Speed
"(\\d+\\.\\d+)," + // Course
"(-?\\d+\\.\\d+)," + // Altitude
- "(\\d+\\.\\d+)," + // Battery
+ "(\\d+\\.?\\d*)," + // Battery
".+");
@Override
diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
index 791816f29..88e145cae 100644
--- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
@@ -37,6 +37,9 @@ public class T55ProtocolDecoderTest {
verify(decoder.decode(null, null,
"$TRCCR,20140101001122.333,V,60.0,-100.0,1.1,2.2,3.3,4.4,*00"));
+
+ verify(decoder.decode(null, null,
+ "$TRCCR,20140111000000.000,A,60.000000,60.000000,0.00,0.00,0.00,50,*3a"));
}