diff --git a/bsp_q7s/OBSWConfig.h.in b/bsp_q7s/OBSWConfig.h.in index ed321f8c..f5348031 100644 --- a/bsp_q7s/OBSWConfig.h.in +++ b/bsp_q7s/OBSWConfig.h.in @@ -10,6 +10,9 @@ #include "q7sConfig.h" #include "OBSWVersion.h" +// Set to 1 when software is build for EM +#define EM 0 + /*******************************************************************/ /** All of the following flags should be enabled for mission code */ /*******************************************************************/ diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index d824bb95..52ecd30f 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -155,6 +155,7 @@ void initmission::initTasks() { } #endif +#if OBSW_ADD_RTD_DEVICES == 1 PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask( "TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc); result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF); @@ -181,7 +182,6 @@ void initmission::initTasks() { objects::RTD_14_IC17_TCS_BOARD, objects::RTD_15_IC18_IMTQ, }; -#if OBSW_ADD_RTD_DEVICES == 1 tcsTask->addComponent(objects::TCS_BOARD_ASS); for (const auto& rtd : rtdIds) { tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION); @@ -287,10 +287,14 @@ void initmission::initTasks() { strHelperTask->startTask(); #endif /* OBSW_ADD_STAR_TRACKER == 1 */ +#if OBSW_ADD_ACS_HANDLERS == 1 acsTask->startTask(); +#endif /* OBSW_ADD_ACS_HANDLERS == 1 */ sysTask->startTask(); +#if OBSW_ADD_RTD_DEVICES == 1 tcsPollingTask->startTask(); tcsTask->startTask(); +#endif /* OBSW_ADD_RTD_DEVICES == 1 */ #if OBSW_ADD_PLOC_SUPERVISOR == 1 supvHelperTask->startTask(); #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index b5b5f06d..8cf872d3 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -102,9 +102,13 @@ void Factory::setStaticFrameworkObjectIds() { CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR; CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL; +#if EM == 1 + DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT; +#else DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER; - // DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT; -#if OBSW_TM_TO_PTME == 1 +#endif /* EM == 1 */ + + #if OBSW_TM_TO_PTME == 1 TmFunnel::downlinkDestination = objects::CCSDS_HANDLER; #else TmFunnel::downlinkDestination = objects::TMTC_BRIDGE; diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 327e7b87..ad1fc458 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -38,9 +38,13 @@ void ObjectFactory::produce(void* args) { createSolarArrayDeploymentComponents(); createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher); #if OBSW_ADD_SYRLINKS == 1 +#if EM == 1 + createSyrlinksComponents(nullptr); +#else createSyrlinksComponents(pwrSwitcher); +#endif /* EM == 1 */ #endif /* OBSW_ADD_SYRLINKS == 1 */ - createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher); + createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF); createPayloadComponents(gpioComIF); #if OBSW_ADD_MGT == 1 diff --git a/fsfw b/fsfw index ebbe0863..95a64e1d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit ebbe08639caae43667829d2cc2bcbdf91260e175 +Subproject commit 95a64e1da3bb6d334c58c9ba78747bcdaccd5a8b