summaryrefslogtreecommitdiffstats
path: root/control/zone.cpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-09-14 16:47:55 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-09-26 09:51:50 -0500
commit4e72854210866ae47b6446dc78df42fff540c68e (patch)
treee9919ba66b01cbf21a7dbfebbc84aaaa5def1275 /control/zone.cpp
parent1bfdc423ca27944e9040990b18f2e32d85ac0559 (diff)
downloadphosphor-fan-presence-4e72854210866ae47b6446dc78df42fff540c68e.tar.gz
phosphor-fan-presence-4e72854210866ae47b6446dc78df42fff540c68e.zip
Use speed request base in inc/dec speed changes
For increase and decrease speed changes, the new target speed is calculated from either a set speed request base value or the current target speed by default. Change-Id: Iad1411437a9945af0b9ae85649d487e36586ef2a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.cpp')
-rw-r--r--control/zone.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/control/zone.cpp b/control/zone.cpp
index 3eab42f..88cdc86 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -132,7 +132,7 @@ void Zone::requestSpeedIncrease(uint64_t targetDelta)
if (targetDelta > _incSpeedDelta &&
_targetSpeed < _ceilingSpeed)
{
- auto requestTarget = _targetSpeed;
+ auto requestTarget = getRequestSpeedBase();
requestTarget = (targetDelta - _incSpeedDelta) + requestTarget;
_incSpeedDelta = targetDelta;
// Target speed can not go above a defined ceiling speed
@@ -174,7 +174,7 @@ void Zone::decTimerExpired()
// the increase timer is not running (i.e. not in the middle of increasing)
if (_incSpeedDelta == 0 && !_incTimer.running())
{
- auto requestTarget = _targetSpeed;
+ auto requestTarget = getRequestSpeedBase();
// Target speed can not go below the defined floor speed
if ((requestTarget < _decSpeedDelta) ||
(requestTarget - _decSpeedDelta < _floorSpeed))
OpenPOWER on IntegriCloud