Filter ADC threshold crossings
When power goes down we get bad events because the
voltage rail spins down faster than pgood. Add in
a delay to check power 2 seconds after the event to
make sure power isn't going down.
Tested-by: power cycled and extra SEL went away
Change-Id: Ib820ccb50d1a949b8096f08e2711ad7a7c36087b
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/ADCSensor.hpp b/include/ADCSensor.hpp
index fd248da..fbb256b 100644
--- a/include/ADCSensor.hpp
+++ b/include/ADCSensor.hpp
@@ -24,6 +24,7 @@
int errCount;
double scaleFactor;
PowerState readState;
+ thresholds::ThresholdTimer thresholdTimer;
void setupRead(void);
void handleResponse(const boost::system::error_code& err);
void checkThresholds(void) override;