I am happy with this version
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-02-13 01:26:30 +01:00
parent c5a4fcd674
commit 3759b5d34a
21 changed files with 193 additions and 12 deletions

View File

@ -81,3 +81,9 @@ void AcsSubsystem::handleEventMessages() {
}
}
}
void AcsSubsystem::announceMode(bool recursive) {
const char* modeStr = acs::getModeStr(static_cast<acs::AcsMode>(mode));
sif::info << "ACS subsystem is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -10,6 +10,7 @@ class AcsSubsystem : public Subsystem {
private:
ReturnValue_t initialize() override;
void performChildOperation() override;
void announceMode(bool recursive) override;
void handleEventMessages();

View File

@ -4,6 +4,7 @@ target_sources(
CamSwitcher.cpp
AcsSubsystem.cpp
ComSubsystem.cpp
TcsSubsystem.cpp
PayloadSubsystem.cpp
AcsBoardAssembly.cpp
Stack5VHandler.cpp

View File

@ -1,5 +1,43 @@
#include "EiveSystem.h"
#include <mission/acsDefs.h>
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
void EiveSystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
switch (mode) {
case (acs::AcsMode::OFF): {
modeStr = "OFF";
break;
}
case (acs::AcsMode::SAFE): {
modeStr = "SAFE";
break;
}
case (acs::AcsMode::DETUMBLE): {
modeStr = "DETUBMLE";
break;
}
case (acs::AcsMode::PTG_IDLE): {
modeStr = "POINTING IDLE";
break;
}
case (acs::AcsMode::PTG_INERTIAL): {
modeStr = "POINTING INERTIAL";
break;
}
case (acs::AcsMode::PTG_TARGET): {
modeStr = "POINTING TARGET";
break;
}
case (acs::AcsMode::PTG_TARGET_GS): {
modeStr = "POINTING TARGET GS";
break;
}
}
sif::info << "EIVE system is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -8,6 +8,7 @@ class EiveSystem : public Subsystem {
EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
void announceMode(bool recursive) override;
};
#endif /* MISSION_SYSTEM_EIVESYSTEM_H_ */

View File

@ -0,0 +1,27 @@
#include "TcsSubsystem.h"
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
TcsSubsystem::TcsSubsystem(object_id_t objectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(objectId, maxNumberOfSequences, maxNumberOfTables) {}
void TcsSubsystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
switch (mode) {
case (HasModesIF::MODE_OFF): {
modeStr = "OFF";
break;
}
case (HasModesIF::MODE_ON): {
modeStr = "ON";
break;
}
case (DeviceHandlerIF::MODE_NORMAL): {
modeStr = "NORMAL";
break;
}
}
sif::info << "TCS subsystem is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -0,0 +1,13 @@
#ifndef MISSION_SYSTEM_OBJECTS_TCSSUBSYSTEM_H_
#define MISSION_SYSTEM_OBJECTS_TCSSUBSYSTEM_H_
#include <fsfw/subsystem/Subsystem.h>
class TcsSubsystem : public Subsystem {
public:
TcsSubsystem(object_id_t objectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
void announceMode(bool recursive) override;
};
#endif /* MISSION_SYSTEM_OBJECTS_TCSSUBSYSTEM_H_ */