pause the tasks waiting for a reboot
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-08-02 09:00:45 +02:00
parent 8105e5f689
commit 988da377b1
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -200,13 +200,16 @@ void EiveSystem::i2cRecoveryLogic() {
TaskFactory::delayTask(500); TaskFactory::delayTask(500);
// We already tried an I2C recovery but the bus is still broken. // We already tried an I2C recovery but the bus is still broken.
// Send reboot request to core controller. // Send reboot request to core controller.
ReturnValue_t result = sendSelfRebootCommand(); result = sendSelfRebootCommand();
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.
return; return;
} }
// Wait for reboot to be done.
TaskFactory::delayTask(3000);
return;
}
} }
} }
if (not isInTransition and performI2cReboot) { if (not isInTransition and performI2cReboot) {
@ -309,6 +312,9 @@ void EiveSystem::pdecRecoveryLogic() {
// 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(); ptmeResetWasAttemptedCd.resetTimer();
} }
// We are done / about to reboot. Delay the rest of the time, graceful reboot takes some
// time.
TaskFactory::delayTask(3000);
return; return;
} else { } else {
// Try one full PDEC reset. // Try one full PDEC reset.