mcFaultToString
This commit is contained in:
parent
a8e4a9f4fc
commit
c732810543
|
@ -26,6 +26,8 @@ enum class McFault : uint8_t
|
||||||
UnderVoltage7 = 7,
|
UnderVoltage7 = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char * mcFaultToString(McFault fault);
|
||||||
|
|
||||||
class Pt2001Base {
|
class Pt2001Base {
|
||||||
public:
|
public:
|
||||||
// Reinitialize the PT2001 chip, returns true if successful
|
// Reinitialize the PT2001 chip, returns true if successful
|
||||||
|
|
|
@ -411,6 +411,18 @@ void Pt2001Base::downloadRegister(int r_target) {
|
||||||
// initMc33816IfNeeded();
|
// initMc33816IfNeeded();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
const char * mcFaultToString(McFault fault) {
|
||||||
|
switch (fault) {
|
||||||
|
case McFault::NoComm:
|
||||||
|
return "NoComm";
|
||||||
|
case McFault::UnderVoltageAfter:
|
||||||
|
return "UnderVoltageAfter";
|
||||||
|
default:
|
||||||
|
return "TODO";
|
||||||
|
}
|
||||||
|
return "TODO";
|
||||||
|
}
|
||||||
|
|
||||||
void Pt2001Base::shutdown() {
|
void Pt2001Base::shutdown() {
|
||||||
setDriveEN(false); // ensure HV is off
|
setDriveEN(false); // ensure HV is off
|
||||||
setResetB(false); // turn off the chip
|
setResetB(false); // turn off the chip
|
||||||
|
|
Loading…
Reference in New Issue