I2C reboot procedure for EIVE system #578

Merged
muellerr merged 17 commits from feature_i2c_reboot_procedure into develop 2023-04-07 11:07:05 +02:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit e4530544c2 - Show all commits

View File

@ -70,7 +70,8 @@ static constexpr Event REBOOT_COUNTER = event::makeEvent(SUBSYSTEM_ID, 7, severi
static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO); static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
//! [EXPORT] : [COMMENT] I2C is unavailable. Triggered to system object can take further steps //! [EXPORT] : [COMMENT] I2C is unavailable. Triggered to system object can take further steps
//! like I2C reboot or reboot. //! like I2C reboot or reboot.
static constexpr Event I2C_UNAVAILABLE = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM); static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
} // namespace core } // namespace core
#endif /* MISSION_SYSDEFS_H_ */ #endif /* MISSION_SYSDEFS_H_ */

View File

@ -134,6 +134,7 @@ ReturnValue_t EiveSystem::executeAction(ActionId_t actionId, MessageQueueId_t co
const uint8_t* data, size_t size) { const uint8_t* data, size_t size) {
switch (actionId) { switch (actionId) {
case (EXECUTE_I2C_REBOOT): { case (EXECUTE_I2C_REBOOT): {
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 // This flag is more related to autonomous recovery handling, so we reset it here if this
// reboot sequence is commanded manually. // reboot sequence is commanded manually.