From c2fa366c08519828b81e57665540f6525d049577 Mon Sep 17 00:00:00 2001 From: Gavriel Fleischer Date: Wed, 13 Mar 2019 11:59:07 +0200 Subject: added POWEROFF to watch protocol --- src/org/traccar/protocol/WatchProtocol.java | 1 + src/org/traccar/protocol/WatchProtocolEncoder.java | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/org/traccar/protocol/WatchProtocol.java b/src/org/traccar/protocol/WatchProtocol.java index b8c990b84..fe285e70d 100644 --- a/src/org/traccar/protocol/WatchProtocol.java +++ b/src/org/traccar/protocol/WatchProtocol.java @@ -31,6 +31,7 @@ public class WatchProtocol extends BaseProtocol { Command.TYPE_ALARM_SOS, Command.TYPE_ALARM_BATTERY, Command.TYPE_REBOOT_DEVICE, + Command.TYPE_POWER_OFF, Command.TYPE_ALARM_REMOVE, Command.TYPE_SILENCE_TIME, Command.TYPE_ALARM_CLOCK, diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java index df29d83a9..264aec81f 100644 --- a/src/org/traccar/protocol/WatchProtocolEncoder.java +++ b/src/org/traccar/protocol/WatchProtocolEncoder.java @@ -139,6 +139,8 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin return formatTextCommand(channel, command, "LOWBAT,{%s}", Command.KEY_ENABLE); case Command.TYPE_REBOOT_DEVICE: return formatTextCommand(channel, command, "RESET"); + case Command.TYPE_POWER_OFF: + return formatTextCommand(channel, command, "POWEROFF"); case Command.TYPE_ALARM_REMOVE: return formatTextCommand(channel, command, "REMOVE,{%s}", Command.KEY_ENABLE); case Command.TYPE_SILENCE_TIME: -- cgit v1.2.3