summaryrefslogtreecommitdiffstats
path: root/control
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-12-08 15:31:35 -0600
committerMatthew Barth <msbarth@us.ibm.com>2017-12-11 13:57:30 -0600
commitc63973a1810dfbba60cb00d4a11d609cb32908eb (patch)
tree2d4b14ca7b273889422b2abf8cfbcc1bf1fb9f84 /control
parentd199dcdfd50debb67645a320fe04ad35c9b0c999 (diff)
downloadphosphor-fan-presence-c63973a1810dfbba60cb00d4a11d609cb32908eb.tar.gz
phosphor-fan-presence-c63973a1810dfbba60cb00d4a11d609cb32908eb.zip
Use Ceiling speed as request base
When determining the request base speed for speed decreases, the current ceiling speed should be used when the request base speed is above the ceiling. Change-Id: Iefc2f1669b853e099fbda15dc8c8983f5f1f269a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control')
-rw-r--r--control/zone.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/control/zone.cpp b/control/zone.cpp
index 7b2b31e..ffde46a 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -275,6 +275,11 @@ void Zone::decTimerExpired()
if (_incSpeedDelta == 0 && !_incTimer.running())
{
auto requestTarget = getRequestSpeedBase();
+ // Request target speed should not start above ceiling
+ if (requestTarget > _ceilingSpeed)
+ {
+ requestTarget = _ceilingSpeed;
+ }
// Target speed can not go below the defined floor speed
if ((requestTarget < _decSpeedDelta) ||
(requestTarget - _decSpeedDelta < _floorSpeed))
OpenPOWER on IntegriCloud