From 3ebc5ac0df8a8301501d566c42f983e7c2214af8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 26 May 2015 15:28:29 +1200 Subject: Stop sending alarm messages --- src/org/traccar/protocol/Gps103ProtocolDecoder.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/org/traccar') 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(); -- cgit v1.2.3