From 1165c4b92f3f6af49dc294fb8376a41509569770 Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Tue, 24 Jun 2025 15:03:21 +0200 Subject: [PATCH] Diag: set W255 only once --- src/ATBAPP/DeviceControllerDiag.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ATBAPP/DeviceControllerDiag.cpp b/src/ATBAPP/DeviceControllerDiag.cpp index 50c951f..f276126 100644 --- a/src/ATBAPP/DeviceControllerDiag.cpp +++ b/src/ATBAPP/DeviceControllerDiag.cpp @@ -715,8 +715,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"}); }