aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-06-15 11:41:49 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-06-15 11:42:14 +1200
commitf06a4a99f0457cb385dd3465b5be592551a3530b (patch)
tree8050927920e04e7fc7c9ca83349f1e82ff835dc8 /src/org
parent86099e8094713c1d645c091c83aa0e5db4b3d6c5 (diff)
downloadtrackermap-server-f06a4a99f0457cb385dd3465b5be592551a3530b.tar.gz
trackermap-server-f06a4a99f0457cb385dd3465b5be592551a3530b.tar.bz2
trackermap-server-f06a4a99f0457cb385dd3465b5be592551a3530b.zip
Add missing Watch alarms
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/model/Position.java1
-rw-r--r--src/org/traccar/protocol/WatchProtocolDecoder.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index c6420c17b..bf2518c3c 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -119,6 +119,7 @@ public class Position extends Message {
public static final String ALARM_FOOT_BRAKE = "footBrake";
public static final String ALARM_OIL_LEAK = "oilLeak";
public static final String ALARM_TAMPERING = "tampering";
+ public static final String ALARM_REMOVING = "removing";
private String protocol;
diff --git a/src/org/traccar/protocol/WatchProtocolDecoder.java b/src/org/traccar/protocol/WatchProtocolDecoder.java
index 7af856a9c..d55c307da 100644
--- a/src/org/traccar/protocol/WatchProtocolDecoder.java
+++ b/src/org/traccar/protocol/WatchProtocolDecoder.java
@@ -76,6 +76,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
return Position.ALARM_GEOFENCE_ENTER;
} else if (BitUtil.check(status, 3)) {
return Position.ALARM_OVERSPEED;
+ } else if (BitUtil.check(status, 4)) {
+ return Position.ALARM_MOVEMENT;
} else if (BitUtil.check(status, 16)) {
return Position.ALARM_SOS;
} else if (BitUtil.check(status, 17)) {
@@ -84,6 +86,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
return Position.ALARM_GEOFENCE_EXIT;
} else if (BitUtil.check(status, 19)) {
return Position.ALARM_GEOFENCE_ENTER;
+ } else if (BitUtil.check(status, 20)) {
+ return Position.ALARM_REMOVING;
}
return null;
}