rename error state to fault
This commit is contained in:
+3
-3
@@ -28,12 +28,12 @@ bool StateMachine::setState(const STATE newState) noexcept
|
||||
bool StateMachine::canSwitchToState(const STATE newState) const noexcept
|
||||
{
|
||||
// Error state is final
|
||||
if (state == STATE::ERROR) {
|
||||
if (state == STATE::FAULT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Error state only settable via raiseError()
|
||||
if (newState == STATE::ERROR) {
|
||||
if (newState == STATE::FAULT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ bool StateMachine::canSwitchToState(const STATE newState) const noexcept
|
||||
|
||||
bool StateMachine::raiseError(const String &reason) noexcept
|
||||
{
|
||||
state = STATE::ERROR;
|
||||
state = STATE::FAULT;
|
||||
lastError = reason;
|
||||
digitalWrite(ERROR_INDICATOR_LED_PIN, HIGH);
|
||||
UartHandler& uart = UartHandler::getInstance();
|
||||
|
||||
Reference in New Issue
Block a user