Fix SSB TEMP reading 0
From the NM spec, 0 means scanning disabled,
treat this as a read error and not an actual reading.
Tested: Couldn't, my system doesn't read 0
Change-Id: I43e0ee2bd5bdcd1a6386ef745a5b974619193f12
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
index d8b0d4f..5658210 100644
--- a/src/IpmbSensor.cpp
+++ b/src/IpmbSensor.cpp
@@ -234,7 +234,14 @@
switch (readingFormat)
{
case (ReadingFormat::byte0):
+ // from node manager app-note, response of 0 means scanning disabled
+ // for get sensor reading command
+ if (data[0] == 0)
+ {
+ return false;
+ }
resp = data[0];
+
return true;
case (ReadingFormat::byte3):
if (data.size() < 4)