summaryrefslogtreecommitdiffstats
path: root/control/zone.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-06-12 13:39:31 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-26 22:23:13 +0000
commit4af419cd334fa1fc182fe0ba608f984d043df5d9 (patch)
treee6be15c48ff0487013344607850c1aa518bb95a4 /control/zone.hpp
parent28c1a09042a5088069ab3fb69f5886554e1f891e (diff)
downloadphosphor-fan-presence-4af419cd334fa1fc182fe0ba608f984d043df5d9.tar.gz
phosphor-fan-presence-4af419cd334fa1fc182fe0ba608f984d043df5d9.zip
Allow floor speed changes based on sensor values
Given a group of sensor values, the average of those sensor values will be used in selecting the floor speed for the zone. Each time the speed is set/updated, any speed requested lower than the current floor will be overwritten with the floor speed to not allow speeds below the floor. Change-Id: I4c8e8a2cd66892b9fdc2bc5643e907adddff51f8 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r--control/zone.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/control/zone.hpp b/control/zone.hpp
index c524397..24739f8 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -123,6 +123,16 @@ class Zone
return _defFloorSpeed;
};
+ /**
+ * @brief Set the floor speed to the given speed
+ *
+ * @param[in] speed - Speed to set the floor to
+ */
+ inline void setFloor(uint64_t speed)
+ {
+ _floorSpeed = speed;
+ };
+
private:
/**
@@ -146,6 +156,11 @@ class Zone
const uint64_t _defFloorSpeed;
/**
+ * The floor speed to not go below
+ */
+ uint64_t _floorSpeed = _defFloorSpeed;
+
+ /**
* Automatic fan control active state
*/
bool _isActive = true;
OpenPOWER on IntegriCloud