Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
dad0ef4299
|
@@ -62,6 +62,7 @@ void DeviceControllerDiag::diagRequest()
|
||||
qCritical() << "DeviceControllerDiag::diagRequest() is already running";
|
||||
return;
|
||||
}
|
||||
this->machineEventSet.clear();
|
||||
this->isRequestRunning = true;
|
||||
this->diagRequestTimeoutTimer->start();
|
||||
|
||||
@@ -132,9 +133,7 @@ void DeviceControllerDiag::private_startDiag()
|
||||
* - diag is called again in ModeOOO wokeup()
|
||||
*/
|
||||
}
|
||||
this->diagRequestTimeoutTimer->stop();
|
||||
this->isRequestRunning = false;
|
||||
this->flagInterruptDiag = false;
|
||||
this->private_finishDiag();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,9 +183,7 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
this->diagRequestTimeoutTimer->stop();
|
||||
this->isRequestRunning = false;
|
||||
this->flagInterruptDiag = false;
|
||||
this->private_finishDiag();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -197,15 +194,13 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
hw->dc_autoRequest(true);
|
||||
|
||||
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::M0254);
|
||||
previousMachineEventSet.insert(E255Event);
|
||||
machineEventSet.insert(E255Event);
|
||||
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||
|
||||
if (this->E255counter > 5) { this->restartCArun(); }
|
||||
else { this->E255counter++; }
|
||||
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||
this->diagRequestTimeoutTimer->stop();
|
||||
this->isRequestRunning = false;
|
||||
this->flagInterruptDiag = false;
|
||||
this->private_finishDiag();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -237,8 +232,6 @@ void DeviceControllerDiag::sys_superviseSystem()
|
||||
|
||||
void DeviceControllerDiag::sub_componentAssessment()
|
||||
{
|
||||
this->machineEventSet.clear();
|
||||
|
||||
bool flag_sendOperate = true;
|
||||
|
||||
struct T_moduleCondition modCond = {};
|
||||
@@ -723,10 +716,8 @@ void DeviceControllerDiag::restartCArun()
|
||||
|
||||
|
||||
DCMachineEvent W255Event = DCMachineEvent(DeviceController::State::W255);
|
||||
if (!this->previousMachineEventSet.contains(W255Event)) {
|
||||
machineEventSet.insert(W255Event);
|
||||
private_sendDiagEvent(W255Event, DeviceController::Action::SET);
|
||||
}
|
||||
|
||||
QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
|
||||
}
|
||||
|
Reference in New Issue
Block a user