diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2018-02-19 16:08:04 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2018-03-01 09:38:40 -0600 |
commit | 3800ae715a5835e72754a03eac230ef00d14c538 (patch) | |
tree | 6a7227252fed1d907dce78fc8670477cff60da42 /monitor/fan.cpp | |
parent | 9396bcc3d3a60fdad5875433210038c1b9d20ac5 (diff) | |
download | phosphor-fan-presence-3800ae715a5835e72754a03eac230ef00d14c538.tar.gz phosphor-fan-presence-3800ae715a5835e72754a03eac230ef00d14c538.zip |
Define a mode for tach sensor timer
Use a single timer on the tach sensors for delaying both nonfunctional
and functional state changes by declaring what mode the timer is in.
Since a fan is either transitioning from a functional state to a
nonfunctional state or vice-versa, enabling the timer in the mode
requested allows the user to define a delay for both of these transition
states.
Tested: Current nonfunctional timer delay operates the same
Change-Id: I0c165355d41d27e1906918953e5226968062ee16
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'monitor/fan.cpp')
-rw-r--r-- | monitor/fan.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/fan.cpp b/monitor/fan.cpp index 228ecd3..96db76c 100644 --- a/monitor/fan.cpp +++ b/monitor/fan.cpp @@ -112,7 +112,7 @@ void Fan::tachChanged(TachSensor& sensor) { if (sensor.functional() && !running) { - sensor.startTimer(); + sensor.startTimer(TimerMode::nonfunc); } } else |