From 6468c5c8ea5d168dd5b7278453ac185029351e0d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 21 Apr 2018 14:07:22 +1200 Subject: Decode AquilaB emergency alarm --- src/org/traccar/protocol/AquilaProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') 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(); -- cgit v1.2.3