aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/Tk103ProtocolDecoderTest.java6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index e884f4be2..5cbde4b7e 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -47,7 +47,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
"(\\d{2})(\\d{2})(\\d{2}),?" + // Time (HHMMSS)
"(\\d+\\.?\\d+),?" + // Course
"([0-9a-fA-F]{8})?,?" + // State
- "(?:L([0-9a-fA-F]+))?\\)?"); // Odometer
+ "(?:L([0-9a-fA-F]+))?.*\\)?"); // Odometer
@Override
protected Object decode(
diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
index 3921ad6b0..ca5c550c7 100644
--- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
@@ -1,9 +1,8 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
-import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
+import static org.traccar.helper.DecoderVerifier.verify;
public class Tk103ProtocolDecoderTest extends ProtocolDecoderTest {
@@ -77,6 +76,9 @@ public class Tk103ProtocolDecoderTest extends ProtocolDecoderTest {
assertNull(decoder.decode(null, null,
"(013632651491,ZC20,040613,040137,6,42,112,0)"));
+ verify(decoder.decode(null, null,
+ "(094050000111BP05000094050000111150808A3804.2418N04616.7468E000.0201447133.3501000011L0028019DT000)"));
+
}
}