summaryrefslogtreecommitdiffstats
path: root/control/actions.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-08-15 13:39:06 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-08-16 09:51:37 -0500
commit60b007660c69d635965a187432ad4b87b1c929f9 (patch)
tree51a45654307d72fdebb1b648db27215f0a29c345 /control/actions.hpp
parent9014980aa76692cd7f08b5e69565133122c758cd (diff)
downloadphosphor-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/actions.hpp')
-rw-r--r--control/actions.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/control/actions.hpp b/control/actions.hpp
index 167149b..ecf900e 100644
--- a/control/actions.hpp
+++ b/control/actions.hpp
@@ -50,12 +50,12 @@ auto count_state_before_speed(size_t count, T&& state, uint64_t speed)
return false;
}
});
- // Update group's fan control active allowed based on action results
- zone.setActiveAllow(&group, !(numAtState >= count));
if (numAtState >= count)
{
zone.setSpeed(speed);
}
+ // Update group's fan control active allowed based on action results
+ zone.setActiveAllow(&group, !(numAtState >= count));
};
}
OpenPOWER on IntegriCloud