diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-09-14 16:23:28 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-09-18 10:48:23 -0500 |
commit | 1bfdc423ca27944e9040990b18f2e32d85ac0559 (patch) | |
tree | e85d53f1212eba230e974304a2ae09660b3a4f67 /control/zone.hpp | |
parent | dd5cad66253f9d3b3e33a4668c9c8ac5ebf9d914 (diff) | |
download | phosphor-fan-presence-1bfdc423ca27944e9040990b18f2e32d85ac0559.tar.gz phosphor-fan-presence-1bfdc423ca27944e9040990b18f2e32d85ac0559.zip |
Zone function to set requested speed base
The requested speed base is the speed value to base calculations for a
new target speed of increases or decreases from.
Change-Id: Iea413baa9c24c3240ddaf179b9faa259566f7e08
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r-- | control/zone.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/control/zone.hpp b/control/zone.hpp index bc21b9f..1696bda 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -214,6 +214,17 @@ class Zone void setFloor(uint64_t speed); /** + * @brief Set the requested speed base to be used as the speed to + * base a new requested speed target from + * + * @param[in] speedBase - Base speed value to use + */ + inline void setRequestSpeedBase(uint64_t speedBase) + { + _requestSpeedBase = speedBase; + }; + + /** * @brief Calculate the requested target speed from the given delta * and increase the fan speeds, not going above the ceiling. * @@ -313,6 +324,11 @@ class Zone uint64_t _decSpeedDelta = 0; /** + * Requested speed base + */ + uint64_t _requestSpeedBase = 0; + + /** * Speed increase delay in seconds */ std::chrono::seconds _incDelay; |