diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-06-17 12:52:20 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-17 12:52:20 +1200 |
commit | 6ac6d713d1ad34c1e13fae65bf79546961ee3574 (patch) | |
tree | 0a3c846ac16cc3adf2443603998377651f2cb7f1 /src/org | |
parent | 6ded2f7b1fc1e6593512f3b2b24400a90991aa89 (diff) | |
parent | fd28a4930cfcc1244cb6fc6baa725156be1bd353 (diff) | |
download | trackermap-server-6ac6d713d1ad34c1e13fae65bf79546961ee3574.tar.gz trackermap-server-6ac6d713d1ad34c1e13fae65bf79546961ee3574.tar.bz2 trackermap-server-6ac6d713d1ad34c1e13fae65bf79546961ee3574.zip |
Merge pull request #3263 from Turbovix/master
Command on and off alarm protocol Suntech
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocol.java | 4 | ||||
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocolEncoder.java | 4 |
2 files changed, 7 insertions, 1 deletions
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 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; |