Compare commits

...

6 Commits
2.8.0 ... 2.8.1

Author SHA1 Message Date
a87a4e6c14 Merge branch 'improveDeviceControllerDiag' into pu/integration 2025-06-25 10:38:31 +02:00
0467db23d1 Merge branch 'ImproveE255Handling' into improveDeviceControllerDiag 2025-06-25 10:36:19 +02:00
e1470d13f1 Diag: clear machine machineEventSet on valid data
This is allowed only here: dc-data is valid (i.e. check for E255 was
sucessfull).
This method sub_componentAssessment() will check all criteria of
dc-module conditions.
2025-06-25 10:29:58 +02:00
1165c4b92f Diag: set W255 only once 2025-06-24 15:03:21 +02:00
40acd0e0c4 Diag: set E255 only once 2025-06-24 14:25:52 +02:00
fe3696ce9c Diag: E255
- handle E255 in previousMachineEventSet (because machineEventSet will
   be cleared regularely)
 - do not call finishDiag() on E255 because this will interscect
   previous- with current machineEventSet and thus remove all Errors/
   Warnings because machineEventSet was cleared and includes only E255!
2025-06-24 14:18:35 +02:00

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();
@@ -133,7 +132,9 @@ void DeviceControllerDiag::private_startDiag()
* - diag is called again in ModeOOO wokeup()
*/
}
this->private_finishDiag();
this->diagRequestTimeoutTimer->stop();
this->isRequestRunning = false;
this->flagInterruptDiag = false;
return;
}
@@ -183,7 +184,9 @@ void DeviceControllerDiag::sys_superviseSystem()
if (this->E255counter > 5) { this->restartCArun(); }
else { this->E255counter++; }
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
this->private_finishDiag();
this->diagRequestTimeoutTimer->stop();
this->isRequestRunning = false;
this->flagInterruptDiag = false;
return;
}
@@ -194,13 +197,15 @@ void DeviceControllerDiag::sys_superviseSystem()
hw->dc_autoRequest(true);
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::M0254);
machineEventSet.insert(E255Event);
previousMachineEventSet.insert(E255Event);
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
if (this->E255counter > 5) { this->restartCArun(); }
else { this->E255counter++; }
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
this->private_finishDiag();
this->diagRequestTimeoutTimer->stop();
this->isRequestRunning = false;
this->flagInterruptDiag = false;
return;
}
@@ -232,6 +237,8 @@ void DeviceControllerDiag::sys_superviseSystem()
void DeviceControllerDiag::sub_componentAssessment()
{
this->machineEventSet.clear();
bool flag_sendOperate = true;
struct T_moduleCondition modCond = {};
@@ -716,8 +723,10 @@ void DeviceControllerDiag::restartCArun()
DCMachineEvent W255Event = DCMachineEvent(DeviceController::State::W255);
machineEventSet.insert(W255Event);
private_sendDiagEvent(W255Event, DeviceController::Action::SET);
if (!this->previousMachineEventSet.contains(W255Event)) {
machineEventSet.insert(W255Event);
private_sendDiagEvent(W255Event, DeviceController::Action::SET);
}
QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
}