aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-14 07:45:17 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-14 07:45:17 +1300
commitb2e05a3552da93ad667c10406c5e9aa0ec702469 (patch)
tree3f120585ba8c3497de28fa138714214ecd8f48ec /src/org
parent5465e58749ecf553839484f4a41ca94a1621bbb8 (diff)
downloadtraccar-server-b2e05a3552da93ad667c10406c5e9aa0ec702469.tar.gz
traccar-server-b2e05a3552da93ad667c10406c5e9aa0ec702469.tar.bz2
traccar-server-b2e05a3552da93ad667c10406c5e9aa0ec702469.zip
Fix H02 status decoding
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 37f6294be..d2d274eeb 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -165,16 +165,10 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
.expression("([EW]),")
.number("(d+.?d*),") // speed
.number("(d+.?d*)?,") // course
- .number("(?:(dd)(dd)(dd))?,") // date (ddmmyy)
- .any()
- .number("(x{8})") // status
- .groupBegin()
- .number(", *(x+),") // mcc
- .number(" *(x+),") // mnc
- .number(" *(x+),") // lac
- .number(" *(x+)") // cid
- .groupEnd("?")
+ .number("(?:(dd)(dd)(dd))?") // date (ddmmyy)
.any()
+ .number(",(x{8})") // status
+ .expression("(?:#|,.*)")
.compile();
private static final Pattern PATTERN_NBR = new PatternBuilder()