From e1b7528fa282b836c45d8b47ca4fdb53a4654b78 Mon Sep 17 00:00:00 2001 From: Turbovix Date: Fri, 16 Jun 2017 21:25:57 -0300 Subject: Update SuntechProtocolEncoder.java --- src/org/traccar/protocol/SuntechProtocolEncoder.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/traccar/protocol/SuntechProtocolEncoder.java b/src/org/traccar/protocol/SuntechProtocolEncoder.java index 4a2b230f2..5b1c802fa 100644 --- a/src/org/traccar/protocol/SuntechProtocolEncoder.java +++ b/src/org/traccar/protocol/SuntechProtocolEncoder.java @@ -43,6 +43,10 @@ public class SuntechProtocolEncoder extends StringProtocolEncoder { return formatCommand(command, "SA200CMD;{%s};02;Enable1\r", Command.KEY_UNIQUE_ID); case Command.TYPE_ENGINE_RESUME: return formatCommand(command, "SA200CMD;{%s};02;Disable1\r", Command.KEY_UNIQUE_ID); + case Command.TYPE_ALARM_ARM: + return formatCommand(command, "SA200CMD;{%s};02;Enable2\r", Command.KEY_UNIQUE_ID); + case Command.TYPE_ALARM_DISARM: + return formatCommand(command, "SA200CMD;{%s};02;Disable2\r", Command.KEY_UNIQUE_ID); default: Log.warning(new UnsupportedOperationException(command.getType())); break; -- cgit v1.2.3 From fd28a4930cfcc1244cb6fc6baa725156be1bd353 Mon Sep 17 00:00:00 2001 From: Turbovix Date: Fri, 16 Jun 2017 21:29:09 -0300 Subject: Update SuntechProtocol.java --- src/org/traccar/protocol/SuntechProtocol.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/SuntechProtocol.java b/src/org/traccar/protocol/SuntechProtocol.java index 871c3becd..03a979d04 100644 --- a/src/org/traccar/protocol/SuntechProtocol.java +++ b/src/org/traccar/protocol/SuntechProtocol.java @@ -35,7 +35,9 @@ public class SuntechProtocol extends BaseProtocol { Command.TYPE_REBOOT_DEVICE, Command.TYPE_POSITION_SINGLE, Command.TYPE_ENGINE_STOP, - Command.TYPE_ENGINE_RESUME); + Command.TYPE_ENGINE_RESUME, + Command.TYPE_ALARM_ARM, + Command.TYPE_ALARM_DISARM); } @Override -- cgit v1.2.3