add first mode sequence for acs ss
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-04-22 17:00:23 +02:00
parent 177b4305bb
commit a0db5dcc7c
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
5 changed files with 88 additions and 2 deletions

View File

@ -1,4 +1,5 @@
target_sources(${OBSW_NAME} PRIVATE
acsModeTree.cpp
CoreController.cpp
obsw.cpp
InitMission.cpp

View File

@ -0,0 +1,72 @@
#include <commonObjects.h>
#include "acsModeTree.h"
#include <fsfw/subsystem/modes/ModeDefinitions.h>
#include <fsfw/subsystem/Subsystem.h>
#include <fsfw/modes/HasModesIF.h>
FixedArrayList<ModeListEntry, 2> ACS_SEQUENCE_OFF = FixedArrayList<ModeListEntry, 2>();
FixedArrayList<ModeListEntry, 0> ACS_TABLE_OFF_TGT = FixedArrayList<ModeListEntry, 0>();
FixedArrayList<ModeListEntry, 6> ACS_TABLE_OFF_TRANS = FixedArrayList<ModeListEntry, 6>();
static constexpr Mode_t ACS_SEQUENCE_OFF_ID = HasModesIF::MODE_OFF;
static constexpr Mode_t ACS_TABLE_OFF_TGT_ID = 0x61000000;
static constexpr Mode_t ACS_TABLE_OFF_TRANS_ID = 0x61000001;
void satsystem::acsSubsystemInit() {
ModeListEntry entry;
Subsystem *acsSubsystem = new Subsystem(objects::ACS_SUBSYSTEM, objects::EIVE_SYSTEM, 20, 20);
buildOffSequence(acsSubsystem, entry);
}
void satsystem::buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
// Build OFF target
ss->addTable(&ACS_TABLE_OFF_TGT, ACS_TABLE_OFF_TGT_ID, false, true);
// Build OFF transition
eh.setObject(objects::ACS_CONTROLLER);
eh.setMode(HasModesIF::MODE_OFF);
eh.setSubmode(0);
ACS_TABLE_OFF_TRANS.insert(eh);
eh.setObject(objects::IMTQ_HANDLER);
eh.setMode(HasModesIF::MODE_OFF);
eh.setSubmode(0);
ACS_TABLE_OFF_TRANS.insert(eh);
eh.setObject(objects::STAR_TRACKER);
eh.setMode(HasModesIF::MODE_OFF);
eh.setSubmode(0);
ACS_TABLE_OFF_TRANS.insert(eh);
eh.setObject(objects::ACS_BOARD_ASS);
eh.setMode(HasModesIF::MODE_OFF);
eh.setSubmode(0);
ACS_TABLE_OFF_TRANS.insert(eh);
eh.setObject(objects::SUS_BOARD_ASS);
eh.setMode(HasModesIF::MODE_OFF);
eh.setSubmode(0);
ACS_TABLE_OFF_TRANS.insert(eh);
eh.setObject(objects::RW_ASS);
eh.setMode(HasModesIF::MODE_OFF);
eh.setSubmode(0);
ACS_TABLE_OFF_TRANS.insert(eh);
ss->addTable(&ACS_TABLE_OFF_TRANS, ACS_TABLE_OFF_TRANS_ID, false, true);
// Build OFF sequence
eh.setTableId(ACS_TABLE_OFF_TGT_ID);
eh.setWaitSeconds(0);
eh.setCheckSuccess(false);
ACS_SEQUENCE_OFF.insert(eh);
eh.setTableId(ACS_TABLE_OFF_TRANS_ID);
eh.setWaitSeconds(0);
eh.setCheckSuccess(false);
ACS_SEQUENCE_OFF.insert(eh);
ss->addSequence(&ACS_SEQUENCE_OFF, ACS_SEQUENCE_OFF_ID, ACS_SEQUENCE_OFF_ID, false, true);
ss->setInitialMode(HasModesIF::MODE_OFF);
}

View File

@ -0,0 +1,10 @@
#include <fsfw/subsystem/modes/ModeDefinitions.h>
class Subsystem;
namespace satsystem {
void acsSubsystemInit();
void buildOffSequence(Subsystem* ss, ModeListEntry& entryHelper);
}

View File

@ -97,7 +97,10 @@ enum commonObjects: uint32_t {
// 0x73 ('s') for assemblies and system/subsystem components
ACS_BOARD_ASS = 0x73000001,
SUS_BOARD_ASS = 0x73000002,
TCS_BOARD_ASS = 0x73000003
TCS_BOARD_ASS = 0x73000003,
RW_ASS = 0x73000004,
ACS_SUBSYSTEM = 0x73010001,
EIVE_SYSTEM = 0x73010000,
};
}

@ -1 +1 @@
Subproject commit 5ad9fb94af3312d29863527106396395f7b808a5
Subproject commit 19e8ee90be12f72ceb8c2aefdfd665b5babad417