aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-15 05:09:00 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-15 13:09:37 +1200
commit4e0113f3901617fe0baa1ce2c9e50c5f34089f78 (patch)
tree23f9a2f00b2eb660a5e3171822476fc0c66dda70 /src
parent9ee73b1c0b15f87b338e02e564fbba9d45f09ce8 (diff)
downloadtraccar-server-4e0113f3901617fe0baa1ce2c9e50c5f34089f78.tar.gz
traccar-server-4e0113f3901617fe0baa1ce2c9e50c5f34089f78.tar.bz2
traccar-server-4e0113f3901617fe0baa1ce2c9e50c5f34089f78.zip
Add power cut GT06 alarm (fix #2321)
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/model/Position.java1
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 95a5011ec..710dd1e83 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -89,6 +89,7 @@ public class Position extends Message {
public static final String ALARM_ACCELETATION = "hardAcceleration";
public static final String ALARM_BREAKING = "hardBreaking";
public static final String ALARM_FATIGUE_DRIVING = "fatigueDriving";
+ public static final String ALARM_POWER_CUT = "powerCut";
private String protocol;
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 3df8a4686..10e19b131 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -167,6 +167,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
switch (value) {
case 0x01:
return Position.ALARM_SOS;
+ case 0x02:
+ return Position.ALARM_POWER_CUT;
case 0x03:
case 0x09:
return Position.ALARM_VIBRATION;