Merge remote-tracking branch 'origin/develop' into continue_tcs_tests
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-04-08 15:57:06 +02:00
29 changed files with 295 additions and 229 deletions

View File

@ -144,9 +144,6 @@ ReturnValue_t EiveSystem::executeAction(ActionId_t actionId, MessageQueueId_t co
case (EXECUTE_I2C_REBOOT): {
triggerEvent(core::TRYING_I2C_RECOVERY);
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;
this->actionCommandedBy = commandedBy;
return returnvalue::OK;
@ -264,11 +261,11 @@ void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0)
void EiveSystem::commonI2cRecoverySequenceFinish() {
alreadyTriedI2cRecovery = true;
performI2cReboot = false;
i2cRecoveryClearCountdown.resetTimer();
i2cRebootState = I2cRebootState::NONE;
// Reset this counter. If I2C devices are still problematic, we will get a full reboot
// next time this count goes above 5.
// Reset this counter and the recovery clear countdown. If I2C devices are still problematic,
// we will get a full reboot next time this count goes above 5.
i2cErrors = 0;
i2cRecoveryClearCountdown.resetTimer();
// This should always be accepted
commandSelfToSafe();
}

View File

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

View File

@ -228,3 +228,27 @@ bool ComSubsystem::isTxMode(Mode_t mode) {
}
return false;
}
void ComSubsystem::announceMode(bool recursive) {
const char *modeStr = "UNKNOWN";
switch (mode) {
case (com::RX_ONLY): {
modeStr = "RX_ONLY";
break;
}
case (com::RX_AND_TX_LOW_DATARATE): {
modeStr = "RX_AND_TX_LOW_DATARATE";
break;
}
case (com::RX_AND_TX_HIGH_DATARATE): {
modeStr = "RX_AND_TX_HIGH_DATARATE";
break;
}
case (com::RX_AND_TX_DEFAULT_DATARATE): {
modeStr = "RX_AND_TX_DEFAULT_DATARATE";
break;
}
}
sif::info << "COM subsystem is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -47,6 +47,7 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
ReturnValue_t initialize() override;
void startTransition(Mode_t mode, Submode_t submode) override;
void announceMode(bool recursive) override;
void readEventQueue();
void handleEventMessage(EventMessage *eventMessage);