start fixing this crap

This commit is contained in:
2022-11-03 22:59:51 +01:00
parent ba70bde3e9
commit fe6b13bb81
7 changed files with 53 additions and 25 deletions

View File

@ -67,12 +67,6 @@ void initmission::initTasks() {
void (*missedDeadlineFunc)(void) = nullptr;
#endif
PeriodicTaskIF* sysCtrlTask = factory->createPeriodicTask(
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = sysCtrlTask->addComponent(objects::CORE_CONTROLLER);
if (result != returnvalue::OK) {
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
}
#if OBSW_ADD_SA_DEPL == 1
// Could add this to the core controller but the core controller does so many thing that I would
// prefer to have the solar array deployment in a seprate task.
@ -84,6 +78,17 @@ void initmission::initTasks() {
}
#endif
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = sysTask->addComponent(objects::CORE_CONTROLLER);
if (result != returnvalue::OK) {
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
}
result = sysTask->addComponent(objects::PL_SUBSYSTEM);
if (result != returnvalue::OK) {
initmission::printAddObjectError("PL_SUBSYSTEM", objects::PL_SUBSYSTEM);
}
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
@ -127,9 +132,7 @@ void initmission::initTasks() {
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
}
// Minimal distance between two received TCs amounts to 0.6 seconds
// If a command has not been read before the next one arrives, the old command will be
// overwritten by the PDEC.
// Runs in IRQ mode, frequency does not really matter
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
"PDEC_HANDLER", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
@ -321,7 +324,7 @@ void initmission::initTasks() {
pdecHandlerTask->startTask();
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
sysCtrlTask->startTask();
sysTask->startTask();
#if OBSW_ADD_SA_DEPL == 1
solarArrayDeplTask->startTask();
#endif