aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-26 15:28:29 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-26 15:28:29 +1200
commit3ebc5ac0df8a8301501d566c42f983e7c2214af8 (patch)
tree2a11dc6457f3ed70672dc225600b55846bacc577 /src/org
parentd8e21f956d2ef8ba0c2fc363209f8f2327f9cce3 (diff)
downloadtrackermap-server-3ebc5ac0df8a8301501d566c42f983e7c2214af8.tar.gz
trackermap-server-3ebc5ac0df8a8301501d566c42f983e7c2214af8.tar.bz2
trackermap-server-3ebc5ac0df8a8301501d566c42f983e7c2214af8.zip
Stop sending alarm messages
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 2558c1c33..f96f30090 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -94,14 +94,19 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
Integer index = 1;
// Get device by IMEI
- if (!identify(parser.group(index++))) {
+ String imei = parser.group(index++);
+ if (!identify(imei)) {
return null;
}
position.setDeviceId(getDeviceId());
// Alarm message
- position.set(Event.KEY_ALARM, parser.group(index++));
-
+ String alarm = parser.group(index++);
+ position.set(Event.KEY_ALARM, alarm);
+ if (channel != null && alarm.equals("help me")) {
+ channel.write("**,imei:" + imei + ",E;", remoteAddress);
+ }
+
// Date
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
time.clear();