Decrease speeds when a decrease delta exists
Each time the decrease timer expires, only calculate and request a
decrease in speed when the decrease speed delta does not equal 0.
Tested:
Decreases no longer requested where the delta == 0
Change-Id: Icbb3ead416d03cd5ebdb11107e0cd6b815802c2f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/zone.cpp b/control/zone.cpp
index 7c09727..82c3b70 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -289,10 +289,12 @@
pred);
// Only decrease speeds when allowed,
+ // a requested decrease speed delta exists,
// where no requested increases exist and
// the increase timer is not running
// (i.e. not in the middle of increasing)
- if (decAllowed && _incSpeedDelta == 0 && !_incTimer.isEnabled())
+ if (decAllowed && _decSpeedDelta != 0 &&
+ _incSpeedDelta == 0 && !_incTimer.isEnabled())
{
auto requestTarget = getRequestSpeedBase();
// Request target speed should not start above ceiling