Diag: add single exit method for ReqDiag
This commit is contained in:
parent
ccc2b8120d
commit
18a35acf20
@ -130,6 +130,7 @@ void DeviceControllerDiag::private_startDiag()
|
||||
* - diag is called again in ModeOOO wokeup()
|
||||
*/
|
||||
}
|
||||
this->private_finishDiag();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -174,6 +175,7 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
this->private_finishDiag();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -188,6 +190,7 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
this->private_finishDiag();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -462,7 +465,17 @@ void DeviceControllerDiag::sub_componentAssessment()
|
||||
|
||||
|
||||
// finish diag
|
||||
this->private_finishDiag();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DeviceControllerDiag::private_finishDiag
|
||||
*
|
||||
* Single point to finish a diag process:
|
||||
* -
|
||||
*/
|
||||
void DeviceControllerDiag::private_finishDiag()
|
||||
{
|
||||
this->diagRequestTimeoutTimer->stop();
|
||||
this->isRequestRunning = false;
|
||||
this->flagInterruptDiag = false;
|
||||
@ -474,10 +487,10 @@ void DeviceControllerDiag::sub_componentAssessment()
|
||||
this->isDiagBackgroundTask = false;
|
||||
this->dbus->finishedBackgroundTask("E255");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief DeviceControllerDiag::private_setDiagEvent
|
||||
* @param result - result value from 'sub_componentAssessment()',
|
||||
|
@ -171,6 +171,8 @@ private slots:
|
||||
void private_setDiagEvent(DeviceController::State result);
|
||||
void private_sendDiagEvent(DCMachineEvent result, DeviceController::Action action);
|
||||
|
||||
void private_finishDiag();
|
||||
|
||||
void sys_superviseSystem();
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user