diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2018-02-16 13:06:36 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2018-03-01 09:34:09 -0600 |
commit | c63ef39f17b9dab2ca565091aa076bf219085d7f (patch) | |
tree | ebac95eb69bbc7e5f495482ecc330f76bcb09ce5 /monitor/nonzero_speed_trust.hpp | |
parent | a1c88322b837b2b752494e91427d3950e1cd5ccc (diff) | |
download | phosphor-fan-presence-c63ef39f17b9dab2ca565091aa076bf219085d7f.tar.gz phosphor-fan-presence-c63ef39f17b9dab2ca565091aa076bf219085d7f.zip |
NonzeroSpeed: Check trust determination sensors
Only include defined trust determination sensors in checking the group
trust.
Tested:
Current trust group associations & reactions are unchanged
Combination of sensors included and excluded in trust determination
Change-Id: I0f610b2910ffda849871a9ac9be95f2c056d8248
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'monitor/nonzero_speed_trust.hpp')
-rw-r--r-- | monitor/nonzero_speed_trust.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor/nonzero_speed_trust.hpp b/monitor/nonzero_speed_trust.hpp index 7e6a85a..c5b67fd 100644 --- a/monitor/nonzero_speed_trust.hpp +++ b/monitor/nonzero_speed_trust.hpp @@ -42,7 +42,8 @@ class NonzeroSpeed : public Group /** * Determines if the group is trusted by checking - * if any sensor has a nonzero speed. If all speeds + * if any sensor included in the trust determination + * has a nonzero speed. If all the speeds of these sensors * are zero, then no sensors in the group are trusted. * * @return bool - if group is trusted or not @@ -54,7 +55,7 @@ class NonzeroSpeed : public Group _sensors.end(), [](const auto& s) { - return s.sensor->getInput() != 0; + return s.inTrust && s.sensor->getInput() != 0; }); } }; |