Add in support for detecting an output overcurrent fault
When analyzing the STATUS_WORD bits, check if the IOUT_OC_FAULT bit is
on. That bit indicates that an output overcurrent fault condition has
occurred. Call out the power supply reporting that.
Change-Id: I18c7cd981ffc1b73ab52c90d32ba34195013e65e
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/power-supply/power_supply.hpp b/power-supply/power_supply.hpp
index e9bd9f3..d47ee3c 100644
--- a/power-supply/power_supply.hpp
+++ b/power-supply/power_supply.hpp
@@ -142,6 +142,14 @@
bool inputFault = false;
/**
+ * @brief Set to true when an output over current fault is detected
+ *
+ * This is the "IOUT_OC_FAULT" bit in the low byte from the STATUS_WORD
+ * command response.
+ */
+ bool outputOCFault = false;
+
+ /**
* @brief Callback for inventory property changes
*
* Process change of Present property for power supply.