This commit is contained in:
parent
1f61f7d2e8
commit
a884176773
@ -196,9 +196,11 @@ void EiveSystem::i2cRecoveryLogic() {
|
||||
executeAction(EXECUTE_I2C_REBOOT, MessageQueueIF::NO_QUEUE, nullptr, 0);
|
||||
} else {
|
||||
triggerEvent(core::I2C_REBOOT);
|
||||
// Some delay to ensure that the event is stored in the persistent TM store as well.
|
||||
TaskFactory::delayTask(500);
|
||||
// We already tried an I2C recovery but the bus is still broken.
|
||||
// Send full reboot request to core controller.
|
||||
sendFullRebootCommand();
|
||||
// Send reboot request to core controller.
|
||||
sendSelfRebootCommand();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -294,8 +296,10 @@ void EiveSystem::pdecRecoveryLogic() {
|
||||
// reboot the system.
|
||||
if (ptmeResetWasAttempted) {
|
||||
triggerEvent(core::PDEC_REBOOT);
|
||||
// Some delay to ensure that the event is stored in the persistent TM store as well.
|
||||
TaskFactory::delayTask(500);
|
||||
// Send reboot command.
|
||||
sendFullRebootCommand();
|
||||
sendSelfRebootCommand();
|
||||
} else {
|
||||
// Try one full PDEC reset.
|
||||
CommandMessage msg;
|
||||
@ -329,3 +333,17 @@ ReturnValue_t EiveSystem::handleCommandMessage(CommandMessage* message) {
|
||||
}
|
||||
return Subsystem::handleCommandMessage(message);
|
||||
}
|
||||
|
||||
ReturnValue_t EiveSystem::sendSelfRebootCommand() {
|
||||
CommandMessage msg;
|
||||
uint8_t data[1];
|
||||
// This option is used to target the same image.
|
||||
data[0] = true;
|
||||
store_address_t storeId;
|
||||
ReturnValue_t result = IPCStore->addData(&storeId, data, sizeof(data));
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
ActionMessage::setCommand(&msg, core::XSC_REBOOT_OBC, storeId);
|
||||
return commandQueue->sendMessage(coreCtrlQueueId, &msg);
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ class EiveSystem : public Subsystem, public HasActionsIF {
|
||||
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||
|
||||
ReturnValue_t sendFullRebootCommand();
|
||||
ReturnValue_t sendSelfRebootCommand();
|
||||
|
||||
void pdecRecoveryLogic();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user