started acs subsystem
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -8,6 +8,8 @@
|
||||
|
||||
#include "mission/controller/controllerdefinitions/AcsControllerDefinitions.h"
|
||||
|
||||
// Alias for checker function
|
||||
namespace {
|
||||
void checkInsert(ReturnValue_t result, const char* ctx);
|
||||
void buildOffSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
@ -15,8 +17,8 @@ void buildSafeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildIdleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
} // namespace
|
||||
|
||||
// Alias for checker function
|
||||
const auto CHK = checkInsert;
|
||||
static const auto OFF = HasModesIF::MODE_OFF;
|
||||
static const auto NML = DeviceHandlerIF::MODE_NORMAL;
|
||||
@ -73,7 +75,7 @@ auto ACS_TABLE_TARGET_PT_TRANS_0 =
|
||||
auto ACS_TABLE_TARGET_PT_TRANS_1 =
|
||||
std::make_pair((acs::CtrlModes::TARGET_PT << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||
|
||||
void satsystem::initAcsSubsystem() {
|
||||
void satsystem::acs::init() {
|
||||
ModeListEntry entry;
|
||||
Subsystem* acsSubsystem = new Subsystem(objects::ACS_SUBSYSTEM, objects::EIVE_SYSTEM, 12, 24);
|
||||
buildOffSequence(acsSubsystem, entry);
|
||||
@ -82,11 +84,13 @@ void satsystem::initAcsSubsystem() {
|
||||
buildIdleSequence(acsSubsystem, entry);
|
||||
buildIdleChargeSequence(acsSubsystem, entry);
|
||||
buildTargetPtSequence(acsSubsystem, entry);
|
||||
acsSubsystem->setInitialMode(HasModesIF::MODE_OFF);
|
||||
acsSubsystem->setInitialMode(OFF);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildOffSequence";
|
||||
std::string context = "satsystem::acs::buildOffSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
||||
@ -125,7 +129,7 @@ void buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
}
|
||||
|
||||
void buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildSafeSequence";
|
||||
std::string context = "satsystem::acs::buildSafeSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||
@ -174,7 +178,7 @@ void buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
}
|
||||
|
||||
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildDetumbleSequence";
|
||||
std::string context = "satsystem::acs::buildDetumbleSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||
@ -226,7 +230,7 @@ void buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
}
|
||||
|
||||
void buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildIdleSequence";
|
||||
std::string context = "satsystem::acs::buildIdleSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||
@ -273,7 +277,7 @@ void buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
}
|
||||
|
||||
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildIdleChargeSequence";
|
||||
std::string context = "satsystem::acs::buildIdleChargeSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||
@ -327,7 +331,7 @@ void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
}
|
||||
|
||||
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildTargetPtSequence";
|
||||
std::string context = "satsystem::acs::buildTargetPtSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||
@ -383,6 +387,8 @@ void buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
|
||||
void checkInsert(ReturnValue_t result, const char* ctx) {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx << std::endl;
|
||||
sif::warning << "Insertion failed at " << ctx << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user