diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-21 14:07:22 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-21 14:07:22 +1200 |
commit | 6468c5c8ea5d168dd5b7278453ac185029351e0d (patch) | |
tree | d34ef7207d3f62824965811b5c61224db535538f /src/org | |
parent | 184f9bb3ffa4015836ca6c67552771a4a901c15e (diff) | |
download | trackermap-server-6468c5c8ea5d168dd5b7278453ac185029351e0d.tar.gz trackermap-server-6468c5c8ea5d168dd5b7278453ac185029351e0d.tar.bz2 trackermap-server-6468c5c8ea5d168dd5b7278453ac185029351e0d.zip |
Decode AquilaB emergency alarm
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/AquilaProtocolDecoder.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/AquilaProtocolDecoder.java b/src/org/traccar/protocol/AquilaProtocolDecoder.java index 960139b3f..8e9dd278a 100644 --- a/src/org/traccar/protocol/AquilaProtocolDecoder.java +++ b/src/org/traccar/protocol/AquilaProtocolDecoder.java @@ -242,7 +242,7 @@ public class AquilaProtocolDecoder extends BaseProtocolDecoder { .number("([01]),") // charge .number("(d+.d+),") // power .number("(d+.d+),") // battery - .number("[01],") // emergency + .number("([01]),") // emergency .expression("[CO],") // tamper .number("(d+),") // rssi .number("(d+),") // mcc @@ -295,6 +295,10 @@ public class AquilaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_POWER, parser.nextDouble()); position.set(Position.KEY_BATTERY, parser.nextDouble()); + if (parser.nextInt() == 1) { + position.set(Position.KEY_ALARM, Position.ALARM_SOS); + } + Network network = new Network(); int rssi = parser.nextInt(); |