diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e0537f5..a0287ef2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,15 @@ set(OBSW_ADD_ACS_BOARD set(OBSW_ADD_GPS_CTRL ${INIT_VAL} CACHE STRING "Add GPS controllers") +set(OBSW_ADD_CCSDS_IP_CORES + ${INIT_VAL} + CACHE STRING "Add CCSDS IP cores") +set(OBSW_TM_TO_PTME + ${INIT_VAL} + CACHE STRING "Send telemetry to PTME IP core") +set(OBSW_TC_FROM_PDEC + ${INIT_VAL} + CACHE STRING "Poll telecommand from PDEC IP core") set(OBSW_ADD_TCS_CTRL ${INIT_VAL} CACHE STRING "Add TCS controllers") diff --git a/bsp_hosted/fsfwconfig/OBSWConfig.h.in b/bsp_hosted/fsfwconfig/OBSWConfig.h.in index 69029c23..b7de30f0 100644 --- a/bsp_hosted/fsfwconfig/OBSWConfig.h.in +++ b/bsp_hosted/fsfwconfig/OBSWConfig.h.in @@ -16,7 +16,7 @@ debugging. */ #define OBSW_VEBOSE_LEVEL 1 -#define OBSW_USE_CCSDS_IP_CORE 0 +#define OBSW_ADD_CCSDS_IP_CORES 0 // Set to 1 if all telemetry should be sent to the PTME IP Core #define OBSW_TM_TO_PTME 0 // Set to 1 if telecommands are received via the PDEC IP Core diff --git a/bsp_linux_board/OBSWConfig.h.in b/bsp_linux_board/OBSWConfig.h.in index f17c3d48..04b90ed9 100644 --- a/bsp_linux_board/OBSWConfig.h.in +++ b/bsp_linux_board/OBSWConfig.h.in @@ -103,7 +103,7 @@ /*******************************************************************/ #cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER -#define OBSW_USE_CCSDS_IP_CORE 0 +#define OBSW_ADD_CCSDS_IP_CORES 0 // Set to 1 if all telemetry should be sent to the PTME IP Core #define OBSW_TM_TO_PTME 0 // Set to 1 if telecommands are received via the PDEC IP Core diff --git a/bsp_q7s/OBSWConfig.h.in b/bsp_q7s/OBSWConfig.h.in index bf113173..76173c1b 100644 --- a/bsp_q7s/OBSWConfig.h.in +++ b/bsp_q7s/OBSWConfig.h.in @@ -14,12 +14,6 @@ /** All of the following flags should be enabled for mission code */ /*******************************************************************/ -#define OBSW_USE_CCSDS_IP_CORE 1 -// Set to 1 if all telemetry should be sent to the PTME IP Core -#define OBSW_TM_TO_PTME 0 -// Set to 1 if telecommands are received via the PDEC IP Core -#define OBSW_TC_FROM_PDEC 0 - #define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@ #define OBSW_ADD_MGT @OBSW_ADD_MGT@ #define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@ @@ -41,6 +35,11 @@ #define OBSW_ADD_RAD_SENSORS @OBSW_ADD_RAD_SENSORS@ #define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@ #define OBSW_ADD_SYRLINKS @OBSW_ADD_SYRLINKS@ +#define OBSW_ADD_CCSDS_IP_CORES @OBSW_ADD_CCSDS_IP_CORES@ +// Set to 1 if all telemetry should be sent to the PTME IP Core +#define OBSW_TM_TO_PTME @OBSW_TM_TO_PTME@ +// Set to 1 if telecommands are received via the PDEC IP Core +#define OBSW_TC_FROM_PDEC @OBSW_TC_FROM_PDEC@ #define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 // Configuration parameter which causes the core controller to try to keep at least one SD card diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index f6b9f9f3..ebbb4432 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -119,7 +119,7 @@ void initmission::initTasks() { } #endif -#if OBSW_USE_CCSDS_IP_CORE == 1 +#if OBSW_ADD_CCSDS_IP_CORES == 1 PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask( "CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER); @@ -136,7 +136,7 @@ void initmission::initTasks() { if (result != returnvalue::OK) { initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER); } -#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ +#endif /* OBSW_ADD_CCSDS_IP_CORE == 1 */ #if OBSW_ADD_CFDP_COMPONENTS == 1 PeriodicTaskIF* cfdpTask = factory->createPeriodicTask( @@ -311,12 +311,12 @@ void initmission::initTasks() { tmtcPollingTask->startTask(); #endif -#if OBSW_USE_CCSDS_IP_CORE == 1 +#if OBSW_ADD_CCSDS_IP_CORES == 1 ccsdsHandlerTask->startTask(); pdecHandlerTask->startTask(); -#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ +#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ - sysCtrlTask->startTask(); + // sysCtrlTask->startTask(); #if OBSW_ADD_SA_DEPL == 1 solarArrayDeplTask->startTask(); #endif diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 055113e9..5361eacb 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -68,9 +68,9 @@ void ObjectFactory::produce(void* args) { #if OBSW_ADD_STAR_TRACKER == 1 createStrComponents(pwrSwitcher); #endif /* OBSW_ADD_STAR_TRACKER == 1 */ -#if OBSW_USE_CCSDS_IP_CORE == 1 +#if OBSW_ADD_CCSDS_IP_CORES == 1 createCcsdsComponents(gpioComIF); -#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ +#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ /* Test Task */ #if OBSW_ADD_TEST_CODE == 1 createTestComponents(gpioComIF); diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index d28b7248..f38621f7 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -55,9 +55,9 @@ void ObjectFactory::produce(void* args) { #if OBSW_ADD_STAR_TRACKER == 1 createStrComponents(pwrSwitcher); #endif /* OBSW_ADD_STAR_TRACKER == 1 */ -#if OBSW_USE_CCSDS_IP_CORE == 1 +#if OBSW_ADD_CCSDS_IP_CORES == 1 createCcsdsComponents(gpioComIF); -#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ +#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ #if OBSW_ADD_SCEX_DEVICE == 1 createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false, diff --git a/bsp_te0720_1cfa/InitMission.cpp b/bsp_te0720_1cfa/InitMission.cpp index b7c6b683..d303d41b 100644 --- a/bsp_te0720_1cfa/InitMission.cpp +++ b/bsp_te0720_1cfa/InitMission.cpp @@ -107,7 +107,7 @@ void initmission::initTasks() { } #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ -#if OBSW_USE_CCSDS_IP_CORE == 1 +#if OBSW_ADD_CCSDS_IP_CORE == 1 PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask( "CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER); @@ -124,7 +124,7 @@ void initmission::initTasks() { if (result != returnvalue::OK) { initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER); } -#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ +#endif /* OBSW_ADD_CCSDS_IP_CORE == 1 */ auto taskStarter = [](std::vector& taskVector, std::string name) { for (const auto& task : taskVector) { @@ -140,10 +140,10 @@ void initmission::initTasks() { tmtcDistributor->startTask(); tmtcBridgeTask->startTask(); tmtcPollingTask->startTask(); -#if OBSW_USE_CCSDS_IP_CORE == 1 +#if OBSW_ADD_CCSDS_IP_CORE == 1 pdecHandlerTask->startTask(); ccsdsHandlerTask->startTask(); -#endif /* #if OBSW_USE_CCSDS_IP_CORE == 1 */ +#endif /* #if OBSW_ADD_CCSDS_IP_CORE == 1 */ #if OBSW_ADD_PLOC_SUPERVISOR == 1 supvHelperTask->startTask(); #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ diff --git a/bsp_te0720_1cfa/OBSWConfig.h.in b/bsp_te0720_1cfa/OBSWConfig.h.in index 2f887daa..d2efda38 100644 --- a/bsp_te0720_1cfa/OBSWConfig.h.in +++ b/bsp_te0720_1cfa/OBSWConfig.h.in @@ -13,7 +13,7 @@ /** All of the following flags should be enabled for mission code */ /*******************************************************************/ -#define OBSW_USE_CCSDS_IP_CORE 0 +#define OBSW_ADD_CCSDS_IP_CORE 0 // Set to 1 if all telemetry should be sent to the PTME IP Core #define OBSW_TM_TO_PTME 0 // Set to 1 if telecommands are received via the PDEC IP Core