Send W255 on restart CArun

This commit is contained in:
Siegfried Siegert 2024-07-15 10:08:56 +02:00
parent 6d7d9ade70
commit 2d60a7bd5c
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 7 additions and 0 deletions

View File

@ -583,6 +583,10 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result)
eventClass = EVENT_CLASS::WARNING; eventClass = EVENT_CLASS::WARNING;
parameter = "temperatur warning"; parameter = "temperatur warning";
break; break;
case DeviceController::State::W255: // restart carun
eventClass = EVENT_CLASS::WARNING;
parameter = "restart carun";
break;
} }
this->lastState = result; this->lastState = result;
@ -619,5 +623,6 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result)
void DeviceControllerDiag::restartCArun() void DeviceControllerDiag::restartCArun()
{ {
this->E255counter = 0; this->E255counter = 0;
this->private_sendDiagEvent(DeviceController::State::W255);
QProcess::startDetached("/bin/systemctl", {"restart", "carun"}); QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
} }

View File

@ -55,6 +55,8 @@ namespace DeviceController {
W003, W003,
W004, W004,
W255,
INITIAL_STATE INITIAL_STATE
}; };
Q_ENUM_NS(State) Q_ENUM_NS(State)