more robust code
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

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

View File

@ -200,7 +200,11 @@ void EiveSystem::i2cRecoveryLogic() {
TaskFactory::delayTask(500);
// We already tried an I2C recovery but the bus is still broken.
// Send reboot request to core controller.
sendSelfRebootCommand();
ReturnValue_t result = sendSelfRebootCommand();
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.
return;
}
}
@ -299,7 +303,13 @@ void EiveSystem::pdecRecoveryLogic() {
// Some delay to ensure that the event is stored in the persistent TM store as well.
TaskFactory::delayTask(500);
// Send reboot command.
sendSelfRebootCommand();
ReturnValue_t result = sendSelfRebootCommand();
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();
}
return;
} else {
// Try one full PDEC reset.
CommandMessage msg;