diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2018-02-19 14:13:20 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2018-03-01 09:34:09 -0600 |
commit | 9396bcc3d3a60fdad5875433210038c1b9d20ac5 (patch) | |
tree | f56782772072715912780d087d1cf1036fe8f0f9 /monitor/tach_sensor.hpp | |
parent | c63ef39f17b9dab2ca565091aa076bf219085d7f (diff) | |
download | phosphor-fan-presence-9396bcc3d3a60fdad5875433210038c1b9d20ac5.tar.gz phosphor-fan-presence-9396bcc3d3a60fdad5875433210038c1b9d20ac5.zip |
Add tach sensor functional delay
Add ability to define a delay to marking a tach sensor as functional
when it transitions from a nonfunctional state. Essentially this gives
the option to wait a given amount of time that a tach sensor must be
within the allowed deviation before being updated to functional.
Default functional delay = 0 seconds
Tested: Current fan definition values function the same
Change-Id: I58bf70d2335e27c06037b755cbee8dae81528a5a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'monitor/tach_sensor.hpp')
-rw-r--r-- | monitor/tach_sensor.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/monitor/tach_sensor.hpp b/monitor/tach_sensor.hpp index 2cd0f4a..ed8caf8 100644 --- a/monitor/tach_sensor.hpp +++ b/monitor/tach_sensor.hpp @@ -62,6 +62,7 @@ class TachSensor * @param[in] id - the id of the sensor * @param[in] hasTarget - if the sensor supports * setting the speed + * @param[in] funcDelay - Delay to mark functional * @param[in] interface - the interface of the target * @param[in] factor - the factor of the sensor target * @param[in] offset - the offset of the sensor target @@ -73,6 +74,7 @@ class TachSensor Fan& fan, const std::string& id, bool hasTarget, + size_t funcDelay, const std::string& interface, size_t factor, size_t offset, @@ -247,6 +249,11 @@ class TachSensor const bool _hasTarget; /** + * @brief Amount of time to delay updating to functional + */ + const size_t _funcDelay; + + /** * @brief The interface that the target implements */ const std::string _interface; |