update eive system FDIR
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
#include <mission/comDefs.h>
|
||||
#include <mission/controller/controllerdefinitions/tcsCtrlDefs.h>
|
||||
|
||||
#include "mission/sysDefs.h"
|
||||
|
||||
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||
uint32_t maxNumberOfTables)
|
||||
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {
|
||||
@ -18,15 +20,15 @@ EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
|
||||
void EiveSystem::announceMode(bool recursive) {
|
||||
const char* modeStr = "UNKNOWN";
|
||||
switch (mode) {
|
||||
case (acs::AcsMode::OFF): {
|
||||
modeStr = "OFF";
|
||||
case (satsystem::Mode::BOOT): {
|
||||
modeStr = "OFF/BOOT";
|
||||
break;
|
||||
}
|
||||
case (acs::AcsMode::SAFE): {
|
||||
case (satsystem::Mode::SAFE): {
|
||||
modeStr = "SAFE";
|
||||
break;
|
||||
}
|
||||
case (acs::AcsMode::PTG_IDLE): {
|
||||
case (satsystem::Mode::PTG_IDLE): {
|
||||
modeStr = "POINTING IDLE";
|
||||
break;
|
||||
}
|
||||
@ -48,8 +50,12 @@ void EiveSystem::announceMode(bool recursive) {
|
||||
}
|
||||
|
||||
void EiveSystem::performChildOperation() {
|
||||
Subsystem::performChildOperation();
|
||||
handleEventMessages();
|
||||
return Subsystem::performChildOperation();
|
||||
if (not isInTransition and performSafeRecovery) {
|
||||
commandSelfToSafe();
|
||||
performSafeRecovery = false;
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t EiveSystem::initialize() {
|
||||
@ -85,6 +91,11 @@ void EiveSystem::handleEventMessages() {
|
||||
switch (event.getEvent()) {
|
||||
case tcsCtrl::OBC_OVERHEATING:
|
||||
case tcsCtrl::PCDU_SYSTEM_OVERHEATING: {
|
||||
if (isInTransition) {
|
||||
performSafeRecovery = true;
|
||||
return;
|
||||
}
|
||||
|
||||
commandSelfToSafe();
|
||||
break;
|
||||
}
|
||||
@ -98,14 +109,5 @@ void EiveSystem::handleEventMessages() {
|
||||
}
|
||||
}
|
||||
}
|
||||
void EiveSystem::commandSelfToSafe() {
|
||||
if (fallbackCommandCd.hasTimedOut()) {
|
||||
CommandMessage msg;
|
||||
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, 0);
|
||||
ReturnValue_t result = commandQueue->sendMessage(commandQueue->getId(), &msg);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "EiveSystem: Commanding EIVE-System to SAFE failed" << std::endl;
|
||||
}
|
||||
fallbackCommandCd.resetTimer();
|
||||
}
|
||||
}
|
||||
|
||||
void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0); }
|
||||
|
Reference in New Issue
Block a user