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>
diff --git a/monitor/tach_sensor.cpp b/monitor/tach_sensor.cpp
index d725729..03c34e2 100644
--- a/monitor/tach_sensor.cpp
+++ b/monitor/tach_sensor.cpp
@@ -68,6 +68,7 @@
Fan& fan,
const std::string& id,
bool hasTarget,
+ size_t funcDelay,
const std::string& interface,
size_t factor,
size_t offset,
@@ -78,6 +79,7 @@
_name(FAN_SENSOR_PATH + id),
_invName(path(fan.getName()) / id),
_hasTarget(hasTarget),
+ _funcDelay(funcDelay),
_interface(interface),
_factor(factor),
_offset(offset),