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

@ -1028,7 +1028,7 @@ void ThermalController::ctrlMgt() {
PoolReadGuard pg(&imtqThermalSet); PoolReadGuard pg(&imtqThermalSet);
auto heaterReq = auto heaterReq =
static_cast<ThermalComponentIF::StateRequest>(imtqThermalSet.heaterRequest.value); static_cast<ThermalComponentIF::StateRequest>(imtqThermalSet.heaterRequest.value);
// TODO: remove heaterReq? // TODO: remove heaterReq?
if (heaterReq == ThermalComponentIF::STATE_REQUEST_OPERATIONAL) { if (heaterReq == ThermalComponentIF::STATE_REQUEST_OPERATIONAL) {
sensors[0].first = sensorTemperatures.mgt.isValid(); sensors[0].first = sensorTemperatures.mgt.isValid();
sensors[0].second = sensorTemperatures.mgt.value; sensors[0].second = sensorTemperatures.mgt.value;

View File

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

View File

@ -7,6 +7,8 @@
#include <mission/comDefs.h> #include <mission/comDefs.h>
#include <mission/controller/controllerdefinitions/tcsCtrlDefs.h> #include <mission/controller/controllerdefinitions/tcsCtrlDefs.h>
#include "mission/sysDefs.h"
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables) uint32_t maxNumberOfTables)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) { : Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {
@ -18,15 +20,15 @@ EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
void EiveSystem::announceMode(bool recursive) { void EiveSystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN"; const char* modeStr = "UNKNOWN";
switch (mode) { switch (mode) {
case (acs::AcsMode::OFF): { case (satsystem::Mode::BOOT): {
modeStr = "OFF"; modeStr = "OFF/BOOT";
break; break;
} }
case (acs::AcsMode::SAFE): { case (satsystem::Mode::SAFE): {
modeStr = "SAFE"; modeStr = "SAFE";
break; break;
} }
case (acs::AcsMode::PTG_IDLE): { case (satsystem::Mode::PTG_IDLE): {
modeStr = "POINTING IDLE"; modeStr = "POINTING IDLE";
break; break;
} }
@ -48,8 +50,12 @@ void EiveSystem::announceMode(bool recursive) {
} }
void EiveSystem::performChildOperation() { void EiveSystem::performChildOperation() {
Subsystem::performChildOperation();
handleEventMessages(); handleEventMessages();
return Subsystem::performChildOperation(); if (not isInTransition and performSafeRecovery) {
commandSelfToSafe();
performSafeRecovery = false;
}
} }
ReturnValue_t EiveSystem::initialize() { ReturnValue_t EiveSystem::initialize() {
@ -85,6 +91,11 @@ void EiveSystem::handleEventMessages() {
switch (event.getEvent()) { switch (event.getEvent()) {
case tcsCtrl::OBC_OVERHEATING: case tcsCtrl::OBC_OVERHEATING:
case tcsCtrl::PCDU_SYSTEM_OVERHEATING: { case tcsCtrl::PCDU_SYSTEM_OVERHEATING: {
if (isInTransition) {
performSafeRecovery = true;
return;
}
commandSelfToSafe(); commandSelfToSafe();
break; break;
} }
@ -98,14 +109,5 @@ void EiveSystem::handleEventMessages() {
} }
} }
} }
void EiveSystem::commandSelfToSafe() {
if (fallbackCommandCd.hasTimedOut()) { void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0); }
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();
}
}

View File

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