diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/WatchProtocol.java | 4 | ||||
-rw-r--r-- | src/org/traccar/protocol/WatchProtocolEncoder.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WatchProtocol.java b/src/org/traccar/protocol/WatchProtocol.java index b13fcfb11..8b7d1ee9f 100644 --- a/src/org/traccar/protocol/WatchProtocol.java +++ b/src/org/traccar/protocol/WatchProtocol.java @@ -32,6 +32,7 @@ public class WatchProtocol extends BaseProtocol { super("watch"); setSupportedCommands( Command.TYPE_POSITION_SINGLE, + Command.TYPE_POSITION_PERIODIC, Command.TYPE_SOS_NUMBER, Command.TYPE_ALARM_SOS, Command.TYPE_ALARM_BATTERY, @@ -40,7 +41,8 @@ public class WatchProtocol extends BaseProtocol { Command.TYPE_SILENCE_TIME, Command.TYPE_ALARM_CLOCK, Command.TYPE_SET_PHONEBOOK, - Command.TYPE_VOICE_MESSAGE); + Command.TYPE_VOICE_MESSAGE + ); } @Override diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java index 0b6a83ce9..41f189a89 100644 --- a/src/org/traccar/protocol/WatchProtocolEncoder.java +++ b/src/org/traccar/protocol/WatchProtocolEncoder.java @@ -102,6 +102,8 @@ public class WatchProtocolEncoder extends StringProtocolEncoder { return formatCommand(command, "PHB,{%s}", Command.KEY_DATA); case Command.TYPE_VOICE_MESSAGE: return formatCommand(command, "TK," + getBinaryData(command)); + case Command.TYPE_POSITION_PERIODIC: + return formatCommand(command, "UPLOAD,{%s}", Command.KEY_FREQUENCY); default: Log.warning(new UnsupportedOperationException(command.getType())); break; |