Cleaned up usage of updateValue() callers
Removed needless float, simply using double
Corrected string parsing function called for each type
Callers no longer need to check for equality first
Equality test now added to int and string override methods
This ensures all have same semantics
Removed extraordinarily spammy debug in updateValue(double)
Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: If8422d6516e083041685ddb6ef8cd469299cbad3
diff --git a/src/HwmonTempSensor.cpp b/src/HwmonTempSensor.cpp
index cf8ee10..f110b37 100644
--- a/src/HwmonTempSensor.cpp
+++ b/src/HwmonTempSensor.cpp
@@ -106,12 +106,9 @@
std::getline(responseStream, response);
try
{
- float nvalue = std::stof(response);
+ double nvalue = std::stod(response);
nvalue /= sensorScaleFactor;
- if (static_cast<double>(nvalue) != value)
- {
- updateValue(nvalue);
- }
+ updateValue(nvalue);
errCount = 0;
}
catch (const std::invalid_argument&)