Merge branch 'ImproveE255Handling' into improveDeviceControllerDiag

This commit is contained in:
Siegfried Siegert 2025-06-25 10:36:19 +02:00
commit 0467db23d1
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -62,7 +62,6 @@ void DeviceControllerDiag::diagRequest()
qCritical() << "DeviceControllerDiag::diagRequest() is already running";
return;
}
this->machineEventSet.clear();
this->isRequestRunning = true;
this->diagRequestTimeoutTimer->start();
@ -114,7 +113,7 @@ void DeviceControllerDiag::private_startDiag()
qCritical() << "DeviceControllerDiag::private_startDiag() interrupted!";
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
if (!this->previousMachineEventSet.contains(E255Event)) {
previousMachineEventSet.insert(E255Event);
machineEventSet.insert(E255Event);
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
}
if (this->E255counter > 5) {
@ -179,7 +178,7 @@ void DeviceControllerDiag::sys_superviseSystem()
// send
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
if (!this->previousMachineEventSet.contains(E255Event)) {
previousMachineEventSet.insert(E255Event);
machineEventSet.insert(E255Event);
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
}
if (this->E255counter > 5) { this->restartCArun(); }
@ -238,6 +237,8 @@ void DeviceControllerDiag::sys_superviseSystem()
void DeviceControllerDiag::sub_componentAssessment()
{
this->machineEventSet.clear();
bool flag_sendOperate = true;
struct T_moduleCondition modCond = {};
@ -722,8 +723,10 @@ void DeviceControllerDiag::restartCArun()
DCMachineEvent W255Event = DCMachineEvent(DeviceController::State::W255);
if (!this->previousMachineEventSet.contains(W255Event)) {
machineEventSet.insert(W255Event);
private_sendDiagEvent(W255Event, DeviceController::Action::SET);
}
QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
}