control:actions: Replace `speed` with `target`
Per design, references to "speed" imply the use of RPM which is not
correct when it comes to setting a fan's target which, for example,
could be in PWM. This replaces some missed references to `speed` to
`target`.
Change-Id: Ic534edf06556d7a2035d44b0f1acdc36ba56df25
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/actions/missing_owner_target.cpp b/control/json/actions/missing_owner_target.cpp
index 8d8a605..ccafdc2 100644
--- a/control/json/actions/missing_owner_target.cpp
+++ b/control/json/actions/missing_owner_target.cpp
@@ -56,12 +56,12 @@
void MissingOwnerTarget::setTarget(const json& jsonObj)
{
- if (!jsonObj.contains("speed"))
+ if (!jsonObj.contains("target"))
{
throw ActionParseError{ActionBase::getName(),
- "Missing required speed value"};
+ "Missing required target value"};
}
- _target = jsonObj["speed"].get<uint64_t>();
+ _target = jsonObj["target"].get<uint64_t>();
}
} // namespace phosphor::fan::control::json
diff --git a/control/json/actions/missing_owner_target.hpp b/control/json/actions/missing_owner_target.hpp
index 429f30e..6a802d2 100644
--- a/control/json/actions/missing_owner_target.hpp
+++ b/control/json/actions/missing_owner_target.hpp
@@ -39,7 +39,7 @@
{
public:
/* Name of this action */
- static constexpr auto name = "set_speed_on_missing_owner";
+ static constexpr auto name = "set_target_on_missing_owner";
MissingOwnerTarget() = delete;
MissingOwnerTarget(const MissingOwnerTarget&) = delete;
diff --git a/control/json/actions/request_target_base.hpp b/control/json/actions/request_target_base.hpp
index e5a3469..ab084c8 100644
--- a/control/json/actions/request_target_base.hpp
+++ b/control/json/actions/request_target_base.hpp
@@ -42,7 +42,7 @@
{
public:
/* Name of this action */
- static constexpr auto name = "set_request_speed_base_with_max";
+ static constexpr auto name = "set_request_target_base_with_max";
RequestTargetBase() = delete;
RequestTargetBase(const RequestTargetBase&) = delete;