this is necessary so it works..
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop Build queued...

This commit is contained in:
Robin Müller 2023-04-07 17:24:19 +02:00
parent a419589a7f
commit 8482416ac5
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 3 additions and 7 deletions

View File

@ -144,9 +144,6 @@ ReturnValue_t EiveSystem::executeAction(ActionId_t actionId, MessageQueueId_t co
case (EXECUTE_I2C_REBOOT): { case (EXECUTE_I2C_REBOOT): {
triggerEvent(core::TRYING_I2C_RECOVERY); triggerEvent(core::TRYING_I2C_RECOVERY);
performI2cReboot = true; performI2cReboot = true;
// This flag is more related to autonomous recovery handling, so we reset it here if this
// reboot sequence is commanded manually.
alreadyTriedI2cRecovery = false;
i2cRebootState = I2cRebootState::SYSTEM_MODE_BOOT; i2cRebootState = I2cRebootState::SYSTEM_MODE_BOOT;
this->actionCommandedBy = commandedBy; this->actionCommandedBy = commandedBy;
return returnvalue::OK; return returnvalue::OK;
@ -264,11 +261,11 @@ void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0)
void EiveSystem::commonI2cRecoverySequenceFinish() { void EiveSystem::commonI2cRecoverySequenceFinish() {
alreadyTriedI2cRecovery = true; alreadyTriedI2cRecovery = true;
performI2cReboot = false; performI2cReboot = false;
i2cRecoveryClearCountdown.resetTimer();
i2cRebootState = I2cRebootState::NONE; i2cRebootState = I2cRebootState::NONE;
// Reset this counter. If I2C devices are still problematic, we will get a full reboot // Reset this counter and the recovery clear countdown. If I2C devices are still problematic,
// next time this count goes above 5. // we will get a full reboot next time this count goes above 5.
i2cErrors = 0; i2cErrors = 0;
i2cRecoveryClearCountdown.resetTimer();
// This should always be accepted // This should always be accepted
commandSelfToSafe(); commandSelfToSafe();
} }

View File

@ -41,7 +41,6 @@ class EiveSystem : public Subsystem, public HasActionsIF {
MessageQueueId_t coreCtrlQueueId = MessageQueueIF::NO_QUEUE; MessageQueueId_t coreCtrlQueueId = MessageQueueIF::NO_QUEUE;
MessageQueueId_t actionCommandedBy = MessageQueueIF::NO_QUEUE; MessageQueueId_t actionCommandedBy = MessageQueueIF::NO_QUEUE;
Countdown i2cRebootHandlingCountdown = Countdown(10000); Countdown i2cRebootHandlingCountdown = Countdown(10000);
// Countdown i2cUnavailableCountdown = Countdown(30000);
// After 1 minute, clear the flag to avoid full reboots on I2C issues. // After 1 minute, clear the flag to avoid full reboots on I2C issues.
Countdown i2cRecoveryClearCountdown = Countdown(60000); Countdown i2cRecoveryClearCountdown = Countdown(60000);
ReturnValue_t initialize() override; ReturnValue_t initialize() override;