summaryrefslogtreecommitdiffstats
path: root/control/actions.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-05-22 14:18:25 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-05-31 12:46:08 -0500
commit861d77c39a3b69d5be43aceca72602beb18165df (patch)
tree5f592d2cc58fbbafeb14c6312981e2bcef703d0c /control/actions.hpp
parent14184131ba863121ac0cda5d8cacfd9a18643fae (diff)
downloadphosphor-fan-presence-861d77c39a3b69d5be43aceca72602beb18165df.tar.gz
phosphor-fan-presence-861d77c39a3b69d5be43aceca72602beb18165df.zip
Add an active state for automatic fan control
Each zone contains an active state that determines whether the automatic fan control algorithm is active and controlling the fan speeds dynamically or not. This will be used to determine if the fan speeds within the zone are set dynamically or rather held at another speed for a determined reason. Change-Id: I2f81de168c5f7d859b3ec917022c4749e1a28d4e Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/actions.hpp')
-rw-r--r--control/actions.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/control/actions.hpp b/control/actions.hpp
index eb857b6..96da323 100644
--- a/control/actions.hpp
+++ b/control/actions.hpp
@@ -13,7 +13,7 @@ namespace action
/**
* @brief An action to set the speed on a zone
- * @details The zone is set to the given speed when a defined number of
+ * @details The zone is held at the given speed when a defined number of
* properties in the group are set to the given state
*
* @param[in] count - Number of properties
@@ -37,6 +37,8 @@ auto count_state_before_speed(size_t count, bool state, uint64_t speed)
entry.first,
std::get<propPos>(entry.second)) == state;
});
+ // Update group's fan control active allowed based on action results
+ zone.setActiveAllow(&group, !(numAtState >= count));
if (numAtState >= count)
{
zone.setSpeed(speed);
OpenPOWER on IntegriCloud