this is the cleanest solution
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
This commit is contained in:
parent
988da377b1
commit
4b4dd35b55
@ -195,6 +195,9 @@ void EiveSystem::i2cRecoveryLogic() {
|
||||
// Try recovery.
|
||||
executeAction(EXECUTE_I2C_REBOOT, MessageQueueIF::NO_QUEUE, nullptr, 0);
|
||||
} else {
|
||||
if (waitingForI2cReboot) {
|
||||
return;
|
||||
}
|
||||
triggerEvent(core::I2C_REBOOT);
|
||||
// Some delay to ensure that the event is stored in the persistent TM store as well.
|
||||
TaskFactory::delayTask(500);
|
||||
@ -206,8 +209,7 @@ void EiveSystem::i2cRecoveryLogic() {
|
||||
// If the previous operation failed, it should be re-attempted the next task cycle.
|
||||
return;
|
||||
}
|
||||
// Wait for reboot to be done.
|
||||
TaskFactory::delayTask(3000);
|
||||
waitingForI2cReboot = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -302,6 +304,9 @@ void EiveSystem::pdecRecoveryLogic() {
|
||||
// If a PTME reset was already attempted and there is still an issue receiving TC frames,
|
||||
// reboot the system.
|
||||
if (ptmeResetWasAttempted) {
|
||||
if (waitingForPdecReboot) {
|
||||
return;
|
||||
}
|
||||
triggerEvent(core::PDEC_REBOOT);
|
||||
// Some delay to ensure that the event is stored in the persistent TM store as well.
|
||||
TaskFactory::delayTask(500);
|
||||
@ -312,9 +317,7 @@ void EiveSystem::pdecRecoveryLogic() {
|
||||
// If the previous operation failed, it should be re-attempted the next task cycle.
|
||||
ptmeResetWasAttemptedCd.resetTimer();
|
||||
}
|
||||
// We are done / about to reboot. Delay the rest of the time, graceful reboot takes some
|
||||
// time.
|
||||
TaskFactory::delayTask(3000);
|
||||
waitingForPdecReboot = true;
|
||||
return;
|
||||
} else {
|
||||
// Try one full PDEC reset.
|
||||
@ -324,6 +327,7 @@ void EiveSystem::pdecRecoveryLogic() {
|
||||
commandQueue->sendMessage(pdecHandlerQueueId, &msg);
|
||||
ptmeResetWasAttemptedCd.resetTimer();
|
||||
ptmeResetWasAttempted = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
frameDirtyErrorCounter = 0;
|
||||
|
@ -41,6 +41,8 @@ class EiveSystem : public Subsystem, public HasActionsIF {
|
||||
// only a full reboot will fix the issue.
|
||||
Countdown ptmeResetWasAttemptedCd = Countdown(120000);
|
||||
bool ptmeResetWasAttempted = false;
|
||||
bool waitingForI2cReboot = false;
|
||||
bool waitingForPdecReboot = false;
|
||||
|
||||
ActionHelper actionHelper;
|
||||
PowerSwitchIF* powerSwitcher = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user