This commit is contained in:
parent
6d18e21edf
commit
949ac8942d
@ -296,14 +296,14 @@ ReturnValue_t EiveSystem::sendFullRebootCommand() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EiveSystem::pdecRecoveryLogic() {
|
void EiveSystem::pdecRecoveryLogic() {
|
||||||
if (ptmeResetWasAttempted and ptmeResetWasAttemptedCd.hasTimedOut()) {
|
if (pdecResetWasAttempted and pdecResetWasAttemptedCd.hasTimedOut()) {
|
||||||
ptmeResetWasAttempted = false;
|
pdecResetWasAttempted = false;
|
||||||
}
|
}
|
||||||
if (frameDirtyCheckCd.hasTimedOut()) {
|
if (frameDirtyCheckCd.hasTimedOut()) {
|
||||||
if (frameDirtyErrorCounter >= FRAME_DIRTY_COM_REBOOT_LIMIT) {
|
if (frameDirtyErrorCounter >= FRAME_DIRTY_COM_REBOOT_LIMIT) {
|
||||||
// If a PTME reset was already attempted and there is still an issue receiving TC frames,
|
// If a PTME reset was already attempted and there is still an issue receiving TC frames,
|
||||||
// reboot the system.
|
// reboot the system.
|
||||||
if (ptmeResetWasAttempted) {
|
if (pdecResetWasAttempted) {
|
||||||
if (waitingForPdecReboot) {
|
if (waitingForPdecReboot) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -315,7 +315,8 @@ void EiveSystem::pdecRecoveryLogic() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Sending a reboot command has failed" << std::endl;
|
sif::error << "Sending a reboot command has failed" << std::endl;
|
||||||
// If the previous operation failed, it should be re-attempted the next task cycle.
|
// If the previous operation failed, it should be re-attempted the next task cycle.
|
||||||
ptmeResetWasAttemptedCd.resetTimer();
|
pdecResetWasAttemptedCd.resetTimer();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
waitingForPdecReboot = true;
|
waitingForPdecReboot = true;
|
||||||
return;
|
return;
|
||||||
@ -325,8 +326,8 @@ void EiveSystem::pdecRecoveryLogic() {
|
|||||||
store_address_t dummy{};
|
store_address_t dummy{};
|
||||||
ActionMessage::setCommand(&msg, pdec::RESET_PDEC_WITH_REINIITALIZATION, dummy);
|
ActionMessage::setCommand(&msg, pdec::RESET_PDEC_WITH_REINIITALIZATION, dummy);
|
||||||
commandQueue->sendMessage(pdecHandlerQueueId, &msg);
|
commandQueue->sendMessage(pdecHandlerQueueId, &msg);
|
||||||
ptmeResetWasAttemptedCd.resetTimer();
|
pdecResetWasAttemptedCd.resetTimer();
|
||||||
ptmeResetWasAttempted = true;
|
pdecResetWasAttempted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
frameDirtyErrorCounter = 0;
|
frameDirtyErrorCounter = 0;
|
||||||
|
@ -39,8 +39,8 @@ class EiveSystem : public Subsystem, public HasActionsIF {
|
|||||||
Countdown frameDirtyCheckCd = Countdown(10000);
|
Countdown frameDirtyCheckCd = Countdown(10000);
|
||||||
// If the PDEC reset was already attempted in the last 2 minutes, there is a high chance that
|
// If the PDEC reset was already attempted in the last 2 minutes, there is a high chance that
|
||||||
// only a full reboot will fix the issue.
|
// only a full reboot will fix the issue.
|
||||||
Countdown ptmeResetWasAttemptedCd = Countdown(120000);
|
Countdown pdecResetWasAttemptedCd = Countdown(120000);
|
||||||
bool ptmeResetWasAttempted = false;
|
bool pdecResetWasAttempted = false;
|
||||||
bool waitingForI2cReboot = false;
|
bool waitingForI2cReboot = false;
|
||||||
bool waitingForPdecReboot = false;
|
bool waitingForPdecReboot = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user