Set sensors to NaN when polling is stopped
Do this so that on a power off, all the temp and power sensors won't
just contain their last known value.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I74cf28c89e8ac07ea098759e1484e34a48644972
diff --git a/occ_manager.cpp b/occ_manager.cpp
index a6d18ac..0b1ec10 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -124,6 +124,13 @@
log<level::INFO>("Manager::statusCallBack(): OCCs are not running, "
"stopping poll timer");
_pollTimer->setEnabled(false);
+
+#ifdef READ_OCC_SENSORS
+ for (auto& obj : statusObjects)
+ {
+ setSensorValueToNaN(obj->getOccInstanceID());
+ }
+#endif
}
}