aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java5
-rw-r--r--src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
index 4b11cbc74..6be3d2dc3 100644
--- a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -57,11 +57,14 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
.text("#")
.number("(?:(dd|dddd)|x*)") // cell or voltage
.groupBegin()
- .number("#(d+),") // mcc
+ .text("#")
+ .groupBegin()
+ .number("(d+),") // mcc
.number("(d+),") // mnc
.number("(x+),") // lac
.number("(x+)") // cell id
.groupEnd("?")
+ .groupEnd("?")
.text("$GPRMC,")
.number("(?:(dd)(dd)(dd).d+)?,") // time (hhmmss.sss)
.expression("([AVL]),") // validity
diff --git a/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
index 8a7ba84ab..085d6fc5b 100644
--- a/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
@@ -12,8 +12,8 @@ public class Tlt2hProtocolDecoderTest extends ProtocolTest {
var decoder = inject(new Tlt2hProtocolDecoder(null));
verifyPositions(decoder, false, text(
- "#868105044690301#MT600+#0000#0#0#129#40#0#AUTOLOW#1\r\n" +
- "#072030fa20c$GPRMC,,V,,,,,,,,,,A*5C\r\n"));
+ "#862255061752835#MT710#0000#AUTO#1\r\n" +
+ "#4106#$GPRMC,151410.00,A,3010.4103,N,08146.2728,W,,214.90,010324,,,A*58\r\n"));
verifyPositions(decoder, text(
"#868105044690301#MT600+#0000#0#0#143#40#0#AUTO#1\r\n",