numeric_sensor: log threshold even if value unchanged
Previously, the update skipped value changes if newValue == curValue,
which caused threshold triggers to be missed on first reading if the
value was already beyond the threshold. This change removes the
inequality check to ensure thresholds are evaluated and logged
regardless of whether the value has changed.
Change-Id: Ic62686da641be908d412a3e4cad38ab82bb6274f
Signed-off-by: Peter Yin <peter.yin@quantatw.com>
diff --git a/platform-mc/numeric_sensor.cpp b/platform-mc/numeric_sensor.cpp
index 070dbbb..5bf64a3 100644
--- a/platform-mc/numeric_sensor.cpp
+++ b/platform-mc/numeric_sensor.cpp
@@ -714,8 +714,7 @@
if (functional && available)
{
newValue = unitModifier(conversionFormula(value));
- if (newValue != curValue &&
- (std::isfinite(newValue) || std::isfinite(curValue)))
+ if (std::isfinite(newValue) || std::isfinite(curValue))
{
if (!useMetricInterface)
{