Diag: set E255 only once
This commit is contained in:
parent
91d8eb03b3
commit
cc6dfee0e2
@ -113,8 +113,10 @@ void DeviceControllerDiag::private_startDiag()
|
||||
if (this->flagInterruptDiag) {
|
||||
qCritical() << "DeviceControllerDiag::private_startDiag() interrupted!";
|
||||
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
|
||||
machineEventSet.insert(E255Event);
|
||||
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||
if (!this->previousMachineEventSet.contains(E255Event)) {
|
||||
machineEventSet.insert(E255Event);
|
||||
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||
}
|
||||
if (this->E255counter > 5) {
|
||||
this->restartCArun();
|
||||
// try it again, until success:
|
||||
@ -174,8 +176,10 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
qCritical() << "DeviceControllerDiag::sys_superviseSystem() interrupted!";
|
||||
// send
|
||||
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
|
||||
machineEventSet.insert(E255Event);
|
||||
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||
if (!this->previousMachineEventSet.contains(E255Event)) {
|
||||
machineEventSet.insert(E255Event);
|
||||
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||
}
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
|
Loading…
x
Reference in New Issue
Block a user