Fix Threshold Parse
We agreed on using Label field, so not having thresholds
should be ok.
Tested: PSU1&2 fanspeeds are back
Change-Id: I99b27300a6ee3ebb92b637297adbcc058c6b223b
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index cff542f..cabe06a 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -393,7 +393,9 @@
}
}
else
+ {
nameIndex = 0;
+ }
auto findProperty = labelMatch.find(labelHead);
if (findProperty == labelMatch.end())
@@ -408,11 +410,10 @@
std::vector<thresholds::Threshold> sensorThresholds;
- parseThresholdsFromConfig(*sensorData, sensorThresholds,
- &labelHead);
- if (sensorThresholds.empty())
+ if (!parseThresholdsFromConfig(*sensorData, sensorThresholds))
{
- continue;
+ std::cerr << "error populating thresholds for "
+ << sensorNameSubStr << "\n";
}
auto findSensorType = sensorTable.find(sensorNameSubStr);