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>
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 @@
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 @@
// 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))