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:
parent
d85ddcdbff
commit
b81618344e
@ -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(); }
|
||||||
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user