aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-04-21 14:07:22 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-04-21 14:07:22 +1200
commit6468c5c8ea5d168dd5b7278453ac185029351e0d (patch)
treed34ef7207d3f62824965811b5c61224db535538f /src/org/traccar/protocol
parent184f9bb3ffa4015836ca6c67552771a4a901c15e (diff)
downloadtraccar-server-6468c5c8ea5d168dd5b7278453ac185029351e0d.tar.gz
traccar-server-6468c5c8ea5d168dd5b7278453ac185029351e0d.tar.bz2
traccar-server-6468c5c8ea5d168dd5b7278453ac185029351e0d.zip
Decode AquilaB emergency alarm
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/AquilaProtocolDecoder.java6
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();