aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/model/Command.java2
-rw-r--r--src/org/traccar/protocol/WatchProtocol.java3
-rw-r--r--src/org/traccar/protocol/WatchProtocolEncoder.java2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java
index 51a61b966..2d4a4458b 100644
--- a/src/org/traccar/model/Command.java
+++ b/src/org/traccar/model/Command.java
@@ -41,6 +41,7 @@ public class Command extends Message {
public static final String TYPE_OUTPUT_CONTROL = "outputControl";
public static final String TYPE_VOICE_MONITORING = "voiceMonitoring";
public static final String TYPE_SET_AGPS = "setAgps";
+ public static final String TYPE_SET_HEARTS = "setHearts";
public static final String TYPE_MODE_POWER_SAVING = "modePowerSaving";
public static final String TYPE_MODE_DEEP_SLEEP = "modeDeepSleep";
@@ -63,5 +64,6 @@ public class Command extends Message {
public static final String KEY_DATA = "data";
public static final String KEY_INDEX = "index";
public static final String KEY_PHONE = "phone";
+ public static final String KEY_HEARTS = "hearts";
}
diff --git a/src/org/traccar/protocol/WatchProtocol.java b/src/org/traccar/protocol/WatchProtocol.java
index fb95957c8..57ccf7043 100644
--- a/src/org/traccar/protocol/WatchProtocol.java
+++ b/src/org/traccar/protocol/WatchProtocol.java
@@ -42,7 +42,8 @@ public class WatchProtocol extends BaseProtocol {
Command.TYPE_ALARM_CLOCK,
Command.TYPE_SET_PHONEBOOK,
Command.TYPE_VOICE_MESSAGE,
- Command.TYPE_SET_TIMEZONE
+ Command.TYPE_SET_TIMEZONE,
+ Command.TYPE_SET_HEARTS
);
}
diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java
index a84cf9ef0..aa7db6a32 100644
--- a/src/org/traccar/protocol/WatchProtocolEncoder.java
+++ b/src/org/traccar/protocol/WatchProtocolEncoder.java
@@ -106,6 +106,8 @@ public class WatchProtocolEncoder extends StringProtocolEncoder {
return formatCommand(command, "UPLOAD,{%s}", Command.KEY_FREQUENCY);
case Command.TYPE_SET_TIMEZONE:
return formatCommand(command, "LZ,,{%s}", Command.KEY_TIMEZONE);
+ case Command.TYPE_SET_HEARTS:
+ return formatCommand(command, "FLOWER,{%s}", Command.KEY_HEARTS);
default:
Log.warning(new UnsupportedOperationException(command.getType()));
break;