From 1bfdc423ca27944e9040990b18f2e32d85ac0559 Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Thu, 14 Sep 2017 16:23:28 -0500 Subject: 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 --- control/zone.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'control/zone.hpp') diff --git a/control/zone.hpp b/control/zone.hpp index bc21b9f..1696bda 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -213,6 +213,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. @@ -312,6 +323,11 @@ class Zone */ uint64_t _decSpeedDelta = 0; + /** + * Requested speed base + */ + uint64_t _requestSpeedBase = 0; + /** * Speed increase delay in seconds */ -- cgit v1.2.1