diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-08-15 13:39:06 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-08-16 09:51:37 -0500 |
commit | 60b007660c69d635965a187432ad4b87b1c929f9 (patch) | |
tree | 51a45654307d72fdebb1b648db27215f0a29c345 /control/preconditions.hpp | |
parent | 9014980aa76692cd7f08b5e69565133122c758cd (diff) | |
download | phosphor-fan-presence-60b007660c69d635965a187432ad4b87b1c929f9.tar.gz phosphor-fan-presence-60b007660c69d635965a187432ad4b87b1c929f9.zip |
Updates enabling zone active fan control
A zone is actively controlling its fan speeds when all groups subscribed
to allow active control are set to true. The zone keeps a list of these
groups and their active allow state, if at anytime an action (or
precondition) sets a group's active state to false, any dynamic set
speed requests do not occur. Only requests to set the zone's fans to
full speed is allowed.
Related to this, the zone's target speed should only be updated when a
requested speed is successfully set.
Change-Id: Iec6f15346fee5a6c6046d5b00e949e46aef400b9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/preconditions.hpp')
-rw-r--r-- | control/preconditions.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/control/preconditions.hpp b/control/preconditions.hpp index 8b2e93e..65eb0e2 100644 --- a/control/preconditions.hpp +++ b/control/preconditions.hpp @@ -54,8 +54,6 @@ auto property_states_match(std::vector<PrecondGroup>&& pg, } }); - // Update group's fan control active allowed - zone.setActiveAllow(&group, (precondState == pg.size())); if (precondState == pg.size()) { // Init the event when all the precondition(s) are true @@ -63,10 +61,12 @@ auto property_states_match(std::vector<PrecondGroup>&& pg, } else { - zone.setFullSpeed(); // Unsubscribe the event signals when any precondition is false zone.removeEvent(sse); + zone.setFullSpeed(); } + // Update group's fan control active allowed + zone.setActiveAllow(&group, (precondState == pg.size())); }; } |