aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/H02ProtocolDecoder.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-20 10:54:34 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-02-20 10:54:34 -0500
commit888c392af40187f3a0ecc3395495db9acd85b827 (patch)
treebeb74dff8b8052ffb4a7d3c894b2b4e5a4434973 /src/org/traccar/protocol/H02ProtocolDecoder.java
parent38249673287b908c0ca55847a35ca16a7b6a0c50 (diff)
parent2449895139fa658d082c1085185003a001225bc3 (diff)
downloadtrackermap-server-888c392af40187f3a0ecc3395495db9acd85b827.tar.gz
trackermap-server-888c392af40187f3a0ecc3395495db9acd85b827.tar.bz2
trackermap-server-888c392af40187f3a0ecc3395495db9acd85b827.zip
Resolved conflict with master;
Diffstat (limited to 'src/org/traccar/protocol/H02ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 37f6294be..a717ddc4d 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -75,7 +75,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED);
}
- position.set(Position.KEY_IGNITION, !BitUtil.check(status, 10));
+ position.set(Position.KEY_IGNITION, BitUtil.check(status, 10));
position.set(Position.KEY_STATUS, status);
}
@@ -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()