ipmbsensor fix errors / thresholds
Make the sensor set the lowest possible value when
multiple read errors occur. Also fix the sensor threshold
settings based on the spec:
A high-going threshold has its assertion events become set when the
reading is >= the threshold, while for a low-going event the assertion
becomes set when the reading is <= the threshold.
Tested: fans boosted after putting me in recovery
Change-Id: I0fc9edafb57afa61cf68124eec5d124cdbb51983
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/IpmbSensor.hpp b/include/IpmbSensor.hpp
index f226483..2185b68 100644
--- a/include/IpmbSensor.hpp
+++ b/include/IpmbSensor.hpp
@@ -42,6 +42,7 @@
void init(void);
void loadDefaults(void);
void runInitCmd(void);
+ void processError(void);
IpmbType type;
IpmbSubType subType;
@@ -51,6 +52,7 @@
uint8_t netfn;
uint8_t command;
uint8_t deviceAddress;
+ uint8_t errorCount;
std::vector<uint8_t> commandData;
std::optional<uint8_t> initCommand;
std::vector<uint8_t> initData;