From 87d50a05dde439fac4ff38a644ca27057019464c Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Tue, 19 Mar 2024 13:43:45 +0100 Subject: [PATCH] Check error-state if doors are closed --- src/ATBAPP/ATBDeviceControllerPlugin.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 9a2d223..101f335 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -550,10 +550,14 @@ void ATBDeviceControllerPlugin::onAllDoorsClosed() { qCritical() << "ATBDeviceControllerPlugin::onAllDoorsClosed()"; - emit this->requestModeIDLE(); - this->dbus->finishedBackgroundTask("DOOR_OPEN"); + if (this->diag->isErrorState()) { + emit this->requestModeOOO(); + } + else { + emit this->requestModeIDLE(); + } - // TODO: check for errors and create a machine event + this->dbus->finishedBackgroundTask("DOOR_OPEN"); } void ATBDeviceControllerPlugin::onNewVoltage(uint32_t voltage)