small corrections
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...

This commit is contained in:
2023-08-02 09:25:01 +02:00
parent 6d18e21edf
commit 949ac8942d
2 changed files with 9 additions and 8 deletions

View File

@ -296,14 +296,14 @@ ReturnValue_t EiveSystem::sendFullRebootCommand() {
}
void EiveSystem::pdecRecoveryLogic() {
if (ptmeResetWasAttempted and ptmeResetWasAttemptedCd.hasTimedOut()) {
ptmeResetWasAttempted = false;
if (pdecResetWasAttempted and pdecResetWasAttemptedCd.hasTimedOut()) {
pdecResetWasAttempted = false;
}
if (frameDirtyCheckCd.hasTimedOut()) {
if (frameDirtyErrorCounter >= FRAME_DIRTY_COM_REBOOT_LIMIT) {
// If a PTME reset was already attempted and there is still an issue receiving TC frames,
// reboot the system.
if (ptmeResetWasAttempted) {
if (pdecResetWasAttempted) {
if (waitingForPdecReboot) {
return;
}
@ -315,7 +315,8 @@ void EiveSystem::pdecRecoveryLogic() {
if (result != returnvalue::OK) {
sif::error << "Sending a reboot command has failed" << std::endl;
// If the previous operation failed, it should be re-attempted the next task cycle.
ptmeResetWasAttemptedCd.resetTimer();
pdecResetWasAttemptedCd.resetTimer();
return;
}
waitingForPdecReboot = true;
return;
@ -325,8 +326,8 @@ void EiveSystem::pdecRecoveryLogic() {
store_address_t dummy{};
ActionMessage::setCommand(&msg, pdec::RESET_PDEC_WITH_REINIITALIZATION, dummy);
commandQueue->sendMessage(pdecHandlerQueueId, &msg);
ptmeResetWasAttemptedCd.resetTimer();
ptmeResetWasAttempted = true;
pdecResetWasAttemptedCd.resetTimer();
pdecResetWasAttempted = true;
}
}
frameDirtyErrorCounter = 0;