Send "Operate" machine-event if machine state is no error

This commit is contained in:
Siegfried Siegert 2023-07-24 15:15:38 +02:00
parent be76bfc3fd
commit 2a5a318c1a
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
3 changed files with 10 additions and 2 deletions

View File

@ -56,6 +56,9 @@ QString ATBMachineEvent::getEventClassString(EVENT_CLASS eventClass)
case EVENT_CLASS::STATE:
return "STATE";
break;
case EVENT_CLASS::OPERATE:
return "OPERATE";
break;
case EVENT_CLASS::NOT_DEFINED:
return "NOT_DEFINED";
break;

View File

@ -41,6 +41,7 @@ enum class EVENT_CLASS : quint8 {
ALARM,
DEBUG,
STATE,
OPERATE,
NOT_DEFINED
};

View File

@ -261,6 +261,7 @@ uint8_t DeviceControllerDiag::sys_getSystemErrors()
/**
* @brief DeviceControllerDiag::private_finishedDiag
* @param result - result value from 'sub_componentAssessment()',
* - 0x00 everything is fine
* - 0xFF on timer interrupt
* - 0xFE no valid data from DeviceController
* - 0xFD Service or battery door is open
@ -272,8 +273,6 @@ void DeviceControllerDiag::private_finishedDiag(uint8_t result)
this->isRequestRunning = false;
this->flagInterruptDiag = false;
if (result == 0) return;
qCritical() << "DeviceControllerDiag::private_finishedDiag() result: " << result;
@ -371,6 +370,11 @@ void DeviceControllerDiag::private_finishedDiag(uint8_t result)
eventClass = EVENT_CLASS::STATE;
parameter = "no valid data from DeviceController";
break;
case 0x00: // everything is fine
eventName = "O000";
eventClass = EVENT_CLASS::OPERATE;
parameter = "";
break;
}