summaryrefslogtreecommitdiffstats
path: root/control/zone.cpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-06-12 13:39:31 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-26 22:23:13 +0000
commit4af419cd334fa1fc182fe0ba608f984d043df5d9 (patch)
treee6be15c48ff0487013344607850c1aa518bb95a4 /control/zone.cpp
parent28c1a09042a5088069ab3fb69f5886554e1f891e (diff)
downloadphosphor-fan-presence-4af419cd334fa1fc182fe0ba608f984d043df5d9.tar.gz
phosphor-fan-presence-4af419cd334fa1fc182fe0ba608f984d043df5d9.zip
Allow floor speed changes based on sensor values
Given a group of sensor values, the average of those sensor values will be used in selecting the floor speed for the zone. Each time the speed is set/updated, any speed requested lower than the current floor will be overwritten with the floor speed to not allow speeds below the floor. Change-Id: I4c8e8a2cd66892b9fdc2bc5643e907adddff51f8 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 1a299e2..14bd9d2 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -99,6 +99,11 @@ void Zone::setSpeed(uint64_t speed)
{
for (auto& fan : _fans)
{
+ //TODO openbmc/openbmc#1626 Move to control algorithm function
+ if (speed < _floorSpeed)
+ {
+ speed = _floorSpeed;
+ }
fan->setSpeed(speed);
}
}
OpenPOWER on IntegriCloud