continue TCS mode tree
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
859855ed31
commit
24093e13e7
@ -1,2 +1,2 @@
|
||||
target_sources(${LIB_EIVE_MISSION} PRIVATE acsModeTree.cpp payloadModeTree.cpp tcsModeTree.cpp
|
||||
system.cpp util.cpp)
|
||||
target_sources(${LIB_EIVE_MISSION} PRIVATE acsModeTree.cpp payloadModeTree.cpp
|
||||
tcsModeTree.cpp system.cpp util.cpp)
|
||||
|
@ -16,7 +16,7 @@ namespace {
|
||||
// Alias for checker function
|
||||
const auto check = subsystem::checkInsert;
|
||||
|
||||
void buildOffSequence(Subsystem&ss, ModeListEntry& eh);
|
||||
void buildOffSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void buildDetumbleSequence(Subsystem& ss, ModeListEntry& entryHelper);
|
||||
void buildSafeSequence(Subsystem& ss, ModeListEntry& entryHelper);
|
||||
void buildIdleSequence(Subsystem& ss, ModeListEntry& entryHelper);
|
||||
@ -127,7 +127,7 @@ void buildOffSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ihs(ACS_SEQUENCE_OFF.second, ACS_TABLE_OFF_TGT.first, 0, false);
|
||||
ihs(ACS_SEQUENCE_OFF.second, ACS_TABLE_OFF_TRANS.first, 0, false);
|
||||
check(ss.addSequence(&ACS_SEQUENCE_OFF.second, ACS_SEQUENCE_OFF.first, ACS_SEQUENCE_OFF.first,
|
||||
false, true),
|
||||
false, true),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TRANS_0.first, 0, false);
|
||||
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TRANS_1.first, 0, false);
|
||||
check(ss.addSequence(&ACS_SEQUENCE_SAFE.second, ACS_SEQUENCE_SAFE.first, ACS_SEQUENCE_SAFE.first,
|
||||
false, true),
|
||||
false, true),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
@ -214,13 +214,13 @@ void buildDetumbleSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false,
|
||||
true),
|
||||
true),
|
||||
ctxc);
|
||||
|
||||
// Build DETUMBLE transition 1
|
||||
iht(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TRANS_1.second);
|
||||
check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_1.second, ACS_TABLE_DETUMBLE_TRANS_1.first, false,
|
||||
true),
|
||||
true),
|
||||
ctxc);
|
||||
|
||||
// Build DETUMBLE sequence
|
||||
@ -228,7 +228,7 @@ void buildDetumbleSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_0.first, 0, false);
|
||||
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_1.first, 0, false);
|
||||
check(ss.addSequence(&ACS_SEQUENCE_DETUMBLE.second, ACS_SEQUENCE_DETUMBLE.first,
|
||||
ACS_SEQUENCE_SAFE.first, false, true),
|
||||
ACS_SEQUENCE_SAFE.first, false, true),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
@ -275,8 +275,8 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TGT.first, 0, true);
|
||||
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TRANS_0.first, 0, true);
|
||||
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TRANS_1.first, 0, false);
|
||||
ss.addSequence(&ACS_SEQUENCE_IDLE.second, ACS_SEQUENCE_IDLE.first, ACS_SEQUENCE_SAFE.first,
|
||||
false, true);
|
||||
ss.addSequence(&ACS_SEQUENCE_IDLE.second, ACS_SEQUENCE_IDLE.first, ACS_SEQUENCE_SAFE.first, false,
|
||||
true);
|
||||
}
|
||||
|
||||
void buildIdleChargeSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
@ -314,14 +314,14 @@ void buildIdleChargeSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_IDLE_CHRG_TRANS_0.second);
|
||||
check(ss.addTable(&ACS_TABLE_IDLE_CHRG_TRANS_0.second, ACS_TABLE_IDLE_CHRG_TRANS_0.first, false,
|
||||
true),
|
||||
true),
|
||||
ctxc);
|
||||
|
||||
// Build IDLE transition 1
|
||||
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, acs::IDLE_CHARGE,
|
||||
ACS_TABLE_IDLE_CHRG_TRANS_1.second);
|
||||
check(ss.addTable(&ACS_TABLE_IDLE_CHRG_TRANS_1.second, ACS_TABLE_IDLE_CHRG_TRANS_1.first, false,
|
||||
true),
|
||||
true),
|
||||
ctxc);
|
||||
|
||||
// Build IDLE sequence
|
||||
@ -329,7 +329,7 @@ void buildIdleChargeSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ihs(ACS_SEQUENCE_IDLE_CHRG.second, ACS_TABLE_IDLE_CHRG_TRANS_0.first, 0, true);
|
||||
ihs(ACS_SEQUENCE_IDLE_CHRG.second, ACS_TABLE_IDLE_CHRG_TRANS_1.first, 0, false);
|
||||
check(ss.addSequence(&ACS_SEQUENCE_IDLE_CHRG.second, ACS_SEQUENCE_IDLE_CHRG.first,
|
||||
ACS_SEQUENCE_SAFE.first, false, true),
|
||||
ACS_SEQUENCE_SAFE.first, false, true),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
@ -370,13 +370,13 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||
check(ss.addTable(&ACS_TABLE_TARGET_PT_TRANS_0.second, ACS_TABLE_TARGET_PT_TRANS_0.first, false,
|
||||
true),
|
||||
true),
|
||||
ctxc);
|
||||
|
||||
// Build TARGET PT transition 1
|
||||
iht(objects::ACS_CONTROLLER, acs::CtrlModes::TARGET_PT, 0, ACS_TABLE_TARGET_PT_TRANS_1.second);
|
||||
check(ss.addTable(&ACS_TABLE_TARGET_PT_TRANS_1.second, ACS_TABLE_TARGET_PT_TRANS_1.first, false,
|
||||
true),
|
||||
true),
|
||||
ctxc);
|
||||
|
||||
// Build IDLE sequence
|
||||
@ -384,7 +384,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TRANS_0.first, 0, true);
|
||||
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TRANS_1.first, 0, false);
|
||||
check(ss.addSequence(&ACS_SEQUENCE_TARGET_PT.second, ACS_SEQUENCE_TARGET_PT.first,
|
||||
ACS_SEQUENCE_IDLE.first, false, true),
|
||||
ACS_SEQUENCE_IDLE.first, false, true),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
#include "acsModeTree.h"
|
||||
#include "payloadModeTree.h"
|
||||
#include "tcsModeTree.h"
|
||||
|
||||
void satsystem::init() {
|
||||
acs::init();
|
||||
pl::init();
|
||||
tcs::init();
|
||||
}
|
||||
|
@ -1,12 +1,43 @@
|
||||
#include "tcsModeTree.h"
|
||||
|
||||
#include "eive/objects.h"
|
||||
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
|
||||
#include "fsfw/subsystem/Subsystem.h"
|
||||
#include "mission/system/tree/util.h"
|
||||
#include "eive/objects.h"
|
||||
|
||||
Subsystem satsystem::tcs::SUBSYSTEM(objects::TCS_SUBSYSTEM, 12, 24);
|
||||
|
||||
namespace {
|
||||
// Alias for checker function
|
||||
const auto check = subsystem::checkInsert;
|
||||
void buildOffSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void buildNormalSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
} // namespace
|
||||
|
||||
static const auto OFF = HasModesIF::MODE_OFF;
|
||||
static const auto NML = DeviceHandlerIF::MODE_NORMAL;
|
||||
|
||||
auto TCS_SEQUENCE_OFF = std::make_pair(OFF << 24, FixedArrayList<ModeListEntry, 2>());
|
||||
auto TCS_TABLE_OFF_TGT = std::make_pair((OFF << 24) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||
auto TCS_TABLE_OFF_TRANS_0 = std::make_pair((OFF << 24) | 2, FixedArrayList<ModeListEntry, 4>());
|
||||
auto TCS_TABLE_OFF_TRANS_1 = std::make_pair((OFF << 24) | 2, FixedArrayList<ModeListEntry, 4>());
|
||||
|
||||
auto TCS_SEQUENCE_NORMAL = std::make_pair(NML << 24, FixedArrayList<ModeListEntry, 2>());
|
||||
auto TCS_TABLE_NORMAL_TGT = std::make_pair((NML << 24) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||
auto TCS_TABLE_NORMAL_TRANS_0 = std::make_pair((NML << 24) | 2, FixedArrayList<ModeListEntry, 4>());
|
||||
auto TCS_TABLE_NORMAL_TRANS_1 = std::make_pair((NML << 24) | 2, FixedArrayList<ModeListEntry, 4>());
|
||||
|
||||
void satsystem::tcs::init() {
|
||||
ModeListEntry entry;
|
||||
buildOffSequence(SUBSYSTEM, entry);
|
||||
buildNormalSequence(SUBSYSTEM, entry);
|
||||
SUBSYSTEM.setInitialMode(OFF);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void buildOffSequence(Subsystem& ss, ModeListEntry& eh) {}
|
||||
|
||||
void buildNormalSequence(Subsystem& ss, ModeListEntry& eh) {}
|
||||
|
||||
} // namespace
|
||||
|
Loading…
Reference in New Issue
Block a user