Send W255 on restart CArun

This commit is contained in:
Siegfried Siegert 2024-07-15 10:08:56 +02:00
parent c1dd20ec4f
commit ac93e9e631
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;
parameter = "temperatur warning";
break;
case DeviceController::State::W255: // restart carun
eventClass = EVENT_CLASS::WARNING;
parameter = "restart carun";
break;
}
this->lastState = result;
@ -619,5 +623,6 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result)
void DeviceControllerDiag::restartCArun()
{
this->E255counter = 0;
this->private_sendDiagEvent(DeviceController::State::W255);
QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
}

View File

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