Remove clearFaults calls
The community wasn't thrilled with the device driver
providing the clear_logged_faults command. As it isn't
absolutely necessary for this code to do now, it is being
removed.
Note: Currently Device::clearFaults is a pure virtual function
so it still needs to be defined in the UCD90160 class.
A future commit may also remove these.
Change-Id: I0b3a33d56987dd97ab7253eb6b5d3b5afd835d67
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index 4c64c52..966becc 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -28,8 +28,6 @@
int RuntimeMonitor::run()
{
#ifdef UCD90160_DEVICE_ACCESS
- device->clearFaults();
-
return DeviceMonitor::run();
#else
return EXIT_SUCCESS;
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index a5a6ede..a088b8e 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -31,7 +31,6 @@
using namespace std::string_literals;
-const auto CLEAR_LOGGED_FAULTS = "clear_logged_faults"s;
const auto MFR_STATUS = "mfr_status"s;
const auto DEVICE_NAME = "UCD90160"s;
@@ -110,23 +109,6 @@
return interface.read(MFR_STATUS, Type::DeviceDebug);
}
-void UCD90160::clearFaults()
-{
- try
- {
- interface.write(CLEAR_LOGGED_FAULTS, 1, Type::Base);
- }
- catch (WriteFailure& e)
- {
- if (!accessError)
- {
- log<level::ERR>("UCD90160 clear logged faults command failed");
- commit<WriteFailure>();
- accessError = true;
- }
- }
-}
-
bool UCD90160::checkVOUTFaults()
{
bool errorCreated = false;
diff --git a/power-sequencer/ucd90160.hpp b/power-sequencer/ucd90160.hpp
index a24443e..3232264 100644
--- a/power-sequencer/ucd90160.hpp
+++ b/power-sequencer/ucd90160.hpp
@@ -54,7 +54,9 @@
/**
* Clears faults in the device
*/
- void clearFaults() override;
+ void clearFaults() override
+ {
+ }
private: