aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-07 07:24:17 +1000
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-07 07:24:17 +1000
commit6153dceed18c7ae510cc1d71c407a0cc796dfefe (patch)
treeffbb8077bafcb8b5f905cc36b9e762f6491be4ea /src/org/traccar/protocol/Tlt2hProtocolDecoder.java
parenta8c6a98f80858f2e04753086c1877c75f5abcf80 (diff)
downloadtrackermap-server-6153dceed18c7ae510cc1d71c407a0cc796dfefe.tar.gz
trackermap-server-6153dceed18c7ae510cc1d71c407a0cc796dfefe.tar.bz2
trackermap-server-6153dceed18c7ae510cc1d71c407a0cc796dfefe.zip
Support new TLT-2H message format
Diffstat (limited to 'src/org/traccar/protocol/Tlt2hProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Tlt2hProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
index 5f44bd989..802b00f1f 100644
--- a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -35,7 +35,7 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
private static final Pattern PATTERN_HEADER = new PatternBuilder()
.number("#(d+)#") // imei
- .expression("[^#]+#")
+ .expression("[^#]*#")
.number("d+#")
.expression("([^#]+)#") // status
.number("d+") // number of records
@@ -50,8 +50,8 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
.expression("([NS]),")
.number("(d+)(dd.d+),") // longitude
.number("([EW]),")
- .number("(d+.d+)?,") // speed
- .number("(d+.d+)?,") // course
+ .number("(d+.?d*)?,") // speed
+ .number("(d+.?d*)?,") // course
.number("(dd)(dd)(dd)") // date (ddmmyy)
.any()
.compile();