diff --git a/bsp_hosted/InitMission.cpp b/bsp_hosted/InitMission.cpp index 1301ff51..a10d2f79 100644 --- a/bsp_hosted/InitMission.cpp +++ b/bsp_hosted/InitMission.cpp @@ -10,6 +10,7 @@ #include #include #include +#include "linux/InitMission.h" #include @@ -163,6 +164,18 @@ void initmission::initTasks() { sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl; } +#if OBSW_ADD_PLOC_SUPERVISOR == 1 + PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask( + "PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc); + result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER); + if (result != returnvalue::OK) { + initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER); + } +#endif /* OBSW_ADD_PLOC_SUPERVISOR */ + + PeriodicTaskIF* plTask = factory->createPeriodicTask( + "PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc); + scheduling::addMpsocSupvHandlers(plTask); #if OBSW_ADD_TEST_CODE == 1 result = testTask->addComponent(objects::TEST_TASK); if (result != returnvalue::OK) { diff --git a/bsp_hosted/InitMission.h b/bsp_hosted/InitMission.h index 507de592..41da5db2 100644 --- a/bsp_hosted/InitMission.h +++ b/bsp_hosted/InitMission.h @@ -1,9 +1,6 @@ -#ifndef BSP_LINUX_INITMISSION_H_ -#define BSP_LINUX_INITMISSION_H_ +#pragma once namespace initmission { void initMission(); void initTasks(); }; // namespace initmission - -#endif /* BSP_LINUX_INITMISSION_H_ */ diff --git a/linux/InitMission.h b/linux/InitMission.h index dd809ff7..b5ffc415 100644 --- a/linux/InitMission.h +++ b/linux/InitMission.h @@ -1,4 +1,5 @@ #pragma once + #include namespace scheduling {