adc/hwmtemp: Mark unavailable readings as NaN
Follow the precedence of tach sensor and mark these
as unavaialble.
Tested: They read NaN with power off
Change-Id: I165ae8dd8cbd63dc8ad7c333cebe4d4438962b9e
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp
index 22194e8..5e01503 100644
--- a/src/ADCSensor.cpp
+++ b/src/ADCSensor.cpp
@@ -157,9 +157,13 @@
errCount++;
}
}
+ else if (readState == PowerState::on && !isPowerOn())
+ {
+ errCount = 0;
+ updateValue(std::numeric_limits<double>::quiet_NaN());
+ }
else
{
-
errCount++;
}
// only print once