diff --git a/mission/sysDefs.h b/mission/sysDefs.h index e8ada9f8..1f86ff42 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -93,6 +93,8 @@ static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8 static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM); //! [EXPORT] : [COMMENT] I2C is unavailable. Recovery did not work, performing full reboot. static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::MEDIUM); +//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot. +static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::MEDIUM); } // namespace core diff --git a/mission/system/EiveSystem.cpp b/mission/system/EiveSystem.cpp index 6e4564f5..eb1c4101 100644 --- a/mission/system/EiveSystem.cpp +++ b/mission/system/EiveSystem.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -64,7 +65,6 @@ void EiveSystem::performChildOperation() { return; } pdecRecoveryLogic(); - i2cRecoveryLogic(); } @@ -189,6 +189,7 @@ void EiveSystem::i2cRecoveryLogic() { // Try recovery. executeAction(EXECUTE_I2C_REBOOT, MessageQueueIF::NO_QUEUE, nullptr, 0); } else { + triggerEvent(core::I2C_REBOOT); // We already tried an I2C recovery but the bus is still broken. // Send full reboot request to core controller. sendFullRebootCommand(); @@ -286,6 +287,7 @@ void EiveSystem::pdecRecoveryLogic() { // If a PTME reset was already attempted and there is still an issue receiving TC frames, // reboot the system. if (ptmeResetWasAttempted) { + triggerEvent(core::PDEC_REBOOT); // Send reboot command. sendFullRebootCommand(); } else {