diff --git a/src/ATBAPP/DeviceControllerDiag.cpp b/src/ATBAPP/DeviceControllerDiag.cpp index 94ce4c9..bc47ec4 100644 --- a/src/ATBAPP/DeviceControllerDiag.cpp +++ b/src/ATBAPP/DeviceControllerDiag.cpp @@ -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);