Interrupt DiagRequest on error

This commit is contained in:
Siegfried Siegert 2023-12-11 14:08:39 +01:00
parent bee611651c
commit b3ad8e1ee9
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -57,6 +57,8 @@ void DeviceControllerDiag::private_startDiag()
if (this->flagInterruptDiag) {
qCritical() << "DeviceControllerDiag::private_startDiag() interrupted!";
this->private_sendDiagEvent(DeviceController::State::E255);
this->isRequestRunning = false;
this->flagInterruptDiag = false;
return;
}
@ -89,6 +91,8 @@ void DeviceControllerDiag::sys_superviseSystem()
if (this->flagInterruptDiag) {
qCritical() << "DeviceControllerDiag::sys_superviseSystem() interrupted!";
this->private_sendDiagEvent(DeviceController::State::E255);
this->flagInterruptDiag = false;
this->isRequestRunning = false;
return;
}
@ -97,6 +101,8 @@ void DeviceControllerDiag::sys_superviseSystem()
// es gibt keinerlei gültige Daten vom DC
qCritical() << "DeviceControllerDiag::sys_superviseSystem() no valid data!";
this->private_sendDiagEvent(DeviceController::State::E254);
this->diagRequestTimeoutTimer->stop();
this->isRequestRunning = false;
return;
}