summaryrefslogtreecommitdiffstats
path: root/control/zone.cpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-10-25 10:56:51 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-11-17 13:14:11 -0600
commit2b3db618a00a1360d7a61cf0e712e1c50764297f (patch)
treeae3b28ca37a8afacca3beb8e6f803e496cb25c39 /control/zone.cpp
parent0decd1bd00ecb1d4b7357c49947ee19142ea8e27 (diff)
downloadphosphor-fan-presence-2b3db618a00a1360d7a61cf0e712e1c50764297f.tar.gz
phosphor-fan-presence-2b3db618a00a1360d7a61cf0e712e1c50764297f.zip
Init zone target speed to current target speed
Whenever fan control (control mode) is started, the target speed for each zone should be initialized to the currently set target speed. In the case where a watchdog has triggered the fans to full speed and the target speed does not reflect this, the proper set of set speed events should be configured. In this case, an event could be defined to use the current tach feedback to adjust the target speed prior to account for the real state of the fan speeds. Change-Id: I538644ffc83a6e01469174304d393c889038d066 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.cpp')
-rw-r--r--control/zone.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/control/zone.cpp b/control/zone.cpp
index 418b3ba..cb8ebfa 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -60,6 +60,11 @@ Zone::Zone(Mode mode,
// Do not enable set speed events when in init mode
if (mode != Mode::init)
{
+ // Update target speed to current zone target speed
+ if (!_fans.empty())
+ {
+ _targetSpeed = _fans.front()->getTargetSpeed();
+ }
// Setup signal trigger for set speed events
for (auto& event : std::get<setSpeedEventsPos>(def))
{
OpenPOWER on IntegriCloud