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/zone.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/zone.hpp')
-rw-r--r-- | control/zone.hpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/control/zone.hpp b/control/zone.hpp index 6e81bd1..cb1ce69 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -57,22 +57,16 @@ class Zone /** * Sets all fans in the zone to the speed - * passed in + * passed in when the zone is active * * @param[in] speed - the fan speed */ void setSpeed(uint64_t speed); /** - * Sets the zone to full speed + * Sets the zone to full speed regardless of zone's active state */ - inline void setFullSpeed() - { - if (_fullSpeed != 0) - { - setSpeed(_fullSpeed); - } - } + void setFullSpeed(); /** * @brief Sets the automatic fan control allowed active state @@ -359,7 +353,7 @@ class Zone /** * @brief Map of active fan control allowed by groups */ - std::map<const Group*, bool> _active; + std::map<const Group, bool> _active; /** * @brief List of signal event arguments and Dbus matches for callbacks |