diff options
-rw-r--r-- | monitor/fan.cpp | 10 | ||||
-rw-r--r-- | monitor/fan.hpp | 13 |
2 files changed, 2 insertions, 21 deletions
diff --git a/monitor/fan.cpp b/monitor/fan.cpp index f24312d..9d2593f 100644 --- a/monitor/fan.cpp +++ b/monitor/fan.cpp @@ -154,12 +154,6 @@ uint64_t Fan::findTargetSpeed() } -uint64_t Fan::getTargetSpeed(const TachSensor& sensor) -{ - return sensor.getTarget(); -} - - bool Fan::tooManySensorsNonfunctional() { size_t numFailed = std::count_if(_sensors.begin(), _sensors.end(), @@ -175,7 +169,7 @@ bool Fan::tooManySensorsNonfunctional() bool Fan::outOfRange(const TachSensor& sensor) { auto actual = static_cast<uint64_t>(sensor.getInput()); - auto target = getTargetSpeed(sensor); + auto target = sensor.getTarget(); uint64_t min = target * (100 - _deviation) / 100; uint64_t max = target * (100 + _deviation) / 100; @@ -203,7 +197,7 @@ void Fan::timerExpired(TachSensor& sensor) entry("FAN=%s", _name.c_str()), entry("TACH_SENSOR=%s", sensor.name().c_str()), entry("ACTUAL_SPEED=%lld", sensor.getInput()), - entry("TARGET_SPEED=%lld", getTargetSpeed(sensor))); + entry("TARGET_SPEED=%lld", sensor.getTarget())); updateInventory(false); } diff --git a/monitor/fan.hpp b/monitor/fan.hpp index d765650..bd8179f 100644 --- a/monitor/fan.hpp +++ b/monitor/fan.hpp @@ -147,19 +147,6 @@ class Fan private: /** - * @brief Returns the target speed of the fan - * - * Retrieves the target speed using the given sensor which may or may - * not contain a target speed value. The sensor determines what its - * target speed is. - * - * @param[in] sensor - The sensor to use in getting the target speed - * - * @return - The target speed of the fan - */ - uint64_t getTargetSpeed(const TachSensor& sensor); - - /** * @brief Returns true if the sensor input is not within * some deviation of the target. * |