update eive system FDIR
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-03-21 14:38:10 +01:00
parent d85ddcdbff
commit b81618344e
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 21 additions and 20 deletions

View File

@ -23,6 +23,7 @@ ComSubsystem::ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequence
}
void ComSubsystem::performChildOperation() {
Subsystem::performChildOperation();
readEventQueue();
if (performRecoveryToRxOnly and not isInTransition) {
startRxOnlyRecovery(true);
@ -37,8 +38,6 @@ void ComSubsystem::performChildOperation() {
if (countdownActive) {
checkTransmitterCountdown();
}
Subsystem::performChildOperation();
}
MessageQueueId_t ComSubsystem::getCommandQueue() const { return Subsystem::getCommandQueue(); }

View File

@ -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); }

View File

@ -9,7 +9,7 @@ class EiveSystem : public Subsystem {
private:
MessageQueueIF* eventQueue = nullptr;
Countdown fallbackCommandCd = Countdown(30000);
bool performSafeRecovery = false;
ReturnValue_t initialize() override;
void performChildOperation() override;