v1.16.0 #323
@ -114,9 +114,9 @@ void initmission::initTasks() {
|
||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
||||
|
||||
#if OBSW_ADD_ACS_HANDLERS == 1
|
||||
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
||||
"ACS_CTRL", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||
result = acsTask->addComponent(objects::GPS_CONTROLLER);
|
||||
PeriodicTaskIF* gpsTask = factory->createPeriodicTask(
|
||||
"ACS_CTRL", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||
result = gpsTask->addComponent(objects::GPS_CONTROLLER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
||||
}
|
||||
@ -124,7 +124,7 @@ void initmission::initTasks() {
|
||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
||||
|
||||
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
|
||||
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||
"SYS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||
result = sysTask->addComponent(objects::ACS_BOARD_ASS);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
||||
@ -139,6 +139,10 @@ void initmission::initTasks() {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("TCS_BOARD_ASS", objects::TCS_BOARD_ASS);
|
||||
}
|
||||
result = sysTask->addComponent(objects::ACS_SUBSYSTEM);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
||||
}
|
||||
|
||||
// FS task, task interval does not matter because it runs in permanent loop, priority low
|
||||
// because it is a non-essential background task
|
||||
@ -227,7 +231,7 @@ void initmission::initTasks() {
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
#if OBSW_ADD_ACS_HANDLERS == 1
|
||||
acsTask->startTask();
|
||||
gpsTask->startTask();
|
||||
#endif
|
||||
sysTask->startTask();
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "mission/system/objects/SusAssembly.h"
|
||||
#include "mission/system/objects/SusFdir.h"
|
||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||
#include "mission/system/tree/acsModeTree.h"
|
||||
#include "tmtc/apid.h"
|
||||
#include "tmtc/pusIds.h"
|
||||
|
||||
@ -135,6 +136,7 @@ void ObjectFactory::produce(void* args) {
|
||||
SpiComIF* spiComIF = nullptr;
|
||||
I2cComIF* i2cComIF = nullptr;
|
||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||
|
||||
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF);
|
||||
createTmpComponents();
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
@ -205,6 +207,8 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
new PlocUpdater(objects::PLOC_UPDATER);
|
||||
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
|
||||
|
||||
satsystem::initAcsSubsystem();
|
||||
}
|
||||
|
||||
void ObjectFactory::createTmpComponents() {
|
||||
|
@ -8,8 +8,16 @@
|
||||
|
||||
#include "mission/controller/controllerdefinitions/AcsControllerDefinitions.h"
|
||||
|
||||
void checkInsert(ReturnValue_t result, const char* ctx);
|
||||
void buildOffSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildSafeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildIdleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
|
||||
// Alias for checker function
|
||||
const auto CHK = satsystem::checkInsert;
|
||||
const auto CHK = checkInsert;
|
||||
static const auto OFF = HasModesIF::MODE_OFF;
|
||||
static const auto NML = DeviceHandlerIF::MODE_NORMAL;
|
||||
|
||||
@ -65,7 +73,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::acsSubsystemInit() {
|
||||
void satsystem::initAcsSubsystem() {
|
||||
ModeListEntry entry;
|
||||
Subsystem* acsSubsystem = new Subsystem(objects::ACS_SUBSYSTEM, objects::EIVE_SYSTEM, 12, 24);
|
||||
buildOffSequence(acsSubsystem, entry);
|
||||
@ -77,7 +85,7 @@ void satsystem::acsSubsystemInit() {
|
||||
acsSubsystem->setInitialMode(HasModesIF::MODE_OFF);
|
||||
}
|
||||
|
||||
void satsystem::buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildOffSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -116,7 +124,7 @@ void satsystem::buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void satsystem::buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildSafeSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -165,7 +173,7 @@ void satsystem::buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void satsystem::buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildDetumbleSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -217,7 +225,7 @@ void satsystem::buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void satsystem::buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildIdleSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -264,7 +272,7 @@ void satsystem::buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
false, true);
|
||||
}
|
||||
|
||||
void satsystem::buildIdleChargeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildIdleChargeSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -318,7 +326,7 @@ void satsystem::buildIdleChargeSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void satsystem::buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::buildTargetPtSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -373,7 +381,7 @@ void satsystem::buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void satsystem::checkInsert(ReturnValue_t result, const char* ctx) {
|
||||
void checkInsert(ReturnValue_t result, const char* ctx) {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx << std::endl;
|
||||
}
|
||||
|
@ -4,13 +4,6 @@ class Subsystem;
|
||||
|
||||
namespace satsystem {
|
||||
|
||||
void acsSubsystemInit();
|
||||
void buildOffSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildSafeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildIdleSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildIdleChargeSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void buildTargetPtSequence(Subsystem* ss, ModeListEntry& entryHelper);
|
||||
void initAcsSubsystem();
|
||||
|
||||
void checkInsert(ReturnValue_t result, const char* ctx);
|
||||
} // namespace satsystem
|
||||
|
Loading…
Reference in New Issue
Block a user