Improve E255 handling:
- start BackgroundTask on first data not valid - in any case of E255/data-no-valid: try to restart diag; This is because there were only 'returns' without initiating something, so that next check/restart carun happened first on next wokeup.
This commit is contained in:
parent
efe56672ff
commit
5c66abfd87
@ -112,6 +112,8 @@ void DeviceControllerDiag::private_startDiag()
|
||||
this->flagInterruptDiag = false;
|
||||
if (this->E255counter > 5) {
|
||||
this->restartCArun();
|
||||
// try it again, until success:
|
||||
QTimer::singleShot(1000, this, &DeviceControllerDiag::diagRequest);
|
||||
}
|
||||
else {
|
||||
this->E255counter++;
|
||||
@ -137,8 +139,14 @@ void DeviceControllerDiag::private_startDiag()
|
||||
else {
|
||||
qCritical() << "DeviceControllerDiag::private_startDiag() DCdata is +++not+++ valid";
|
||||
|
||||
// try it again
|
||||
hw->dc_autoRequest(true);
|
||||
|
||||
if (! this->isDiagBackgroundTask) {
|
||||
this->isDiagBackgroundTask = true;
|
||||
this->dbus->startBackgroundTask("E255");
|
||||
}
|
||||
|
||||
// try it again
|
||||
QTimer::singleShot(200, this, &DeviceControllerDiag::private_startDiag);
|
||||
}
|
||||
}
|
||||
@ -161,6 +169,7 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
this->isRequestRunning = false;
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -174,6 +183,7 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
this->isRequestRunning = false;
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -439,6 +449,11 @@ void DeviceControllerDiag::sub_componentAssessment()
|
||||
|
||||
this->previousMachineEventSet = machineEventSet;
|
||||
this->machineEventSet.clear();
|
||||
|
||||
if (this->isDiagBackgroundTask) {
|
||||
this->isDiagBackgroundTask = false;
|
||||
this->dbus->finishedBackgroundTask("E255");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user