From 7cdf0851113b68d378a3ffca777507d7515aafce Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Tue, 20 Dec 2016 11:00:21 +0100 Subject: #2702 Rename "Hearts" function to "Indicator" to be more general --- src/org/traccar/model/Command.java | 3 +-- src/org/traccar/protocol/WatchProtocol.java | 2 +- src/org/traccar/protocol/WatchProtocolEncoder.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index 2d4a4458b..da73af1bb 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -41,7 +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_SET_INDICATOR = "setIndicator"; public static final String TYPE_MODE_POWER_SAVING = "modePowerSaving"; public static final String TYPE_MODE_DEEP_SLEEP = "modeDeepSleep"; @@ -64,6 +64,5 @@ 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 57ccf7043..0dc910d8c 100644 --- a/src/org/traccar/protocol/WatchProtocol.java +++ b/src/org/traccar/protocol/WatchProtocol.java @@ -43,7 +43,7 @@ public class WatchProtocol extends BaseProtocol { Command.TYPE_SET_PHONEBOOK, Command.TYPE_VOICE_MESSAGE, Command.TYPE_SET_TIMEZONE, - Command.TYPE_SET_HEARTS + Command.TYPE_SET_INDICATOR ); } diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java index aa7db6a32..7c96c8a83 100644 --- a/src/org/traccar/protocol/WatchProtocolEncoder.java +++ b/src/org/traccar/protocol/WatchProtocolEncoder.java @@ -106,8 +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); + case Command.TYPE_SET_INDICATOR: + return formatCommand(command, "FLOWER,{%s}", Command.KEY_DATA); default: Log.warning(new UnsupportedOperationException(command.getType())); break; -- cgit v1.2.3