diff --git a/CMakeLists.txt b/CMakeLists.txt index 43336bdd..8e0537f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,18 @@ set(OBSW_ADD_GPS_CTRL set(OBSW_ADD_TCS_CTRL ${INIT_VAL} CACHE STRING "Add TCS controllers") +set(OBSW_ADD_HEATERS + ${INIT_VAL} + CACHE STRING "Add TCS heaters") +set(OBSW_ADD_PLOC_SUPERVISOR + ${INIT_VAL} + CACHE STRING "Add PLOC supervisor handler") +set(OBSW_ADD_SA_DEPL + ${INIT_VAL} + CACHE STRING "Add SA deployment handler") +set(OBSW_ADD_PLOC_MPSOC + ${INIT_VAL} + CACHE STRING "Add MPSoC handler") set(OBSW_ADD_ACS_CTRL ${INIT_VAL} CACHE STRING "Add ACS controller") diff --git a/bsp_q7s/OBSWConfig.h.in b/bsp_q7s/OBSWConfig.h.in index f3cfa907..bf113173 100644 --- a/bsp_q7s/OBSWConfig.h.in +++ b/bsp_q7s/OBSWConfig.h.in @@ -24,8 +24,8 @@ #define OBSW_ADD_MGT @OBSW_ADD_MGT@ #define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@ #define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@ -#define OBSW_ADD_PLOC_SUPERVISOR 1 -#define OBSW_ADD_PLOC_MPSOC 1 +#define OBSW_ADD_PLOC_SUPERVISOR @OBSW_ADD_PLOC_SUPERVISOR@ +#define OBSW_ADD_PLOC_MPSOC @OBSW_ADD_PLOC_MPSOC@ #define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@ #define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@ #define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@ @@ -34,7 +34,9 @@ #define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@ #define OBSW_ADD_RW @OBSW_ADD_RW@ #define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@ +#define OBSW_ADD_SA_DEPL @OBSW_ADD_SA_DEPL@ #define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@ +#define OBSW_ADD_HEATERS @OBSW_ADD_HEATERS@ #define OBSW_ADD_TMP_DEVICES @OBSW_ADD_TMP_DEVICES@ #define OBSW_ADD_RAD_SENSORS @OBSW_ADD_RAD_SENSORS@ #define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@ diff --git a/bsp_q7s/boardtest/Q7STestTask.cpp b/bsp_q7s/boardtest/Q7STestTask.cpp index a782ff6d..50a34284 100644 --- a/bsp_q7s/boardtest/Q7STestTask.cpp +++ b/bsp_q7s/boardtest/Q7STestTask.cpp @@ -75,8 +75,10 @@ ReturnValue_t Q7STestTask::performOneShotAction() { if (doTestProtHandler) { testProtHandler(); } - FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP; - testFileSystemHandlerDirect(opCode); + if (DO_TEST_FS_HANDLER) { + FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP; + testFileSystemHandlerDirect(opCode); + } return TestTask::performOneShotAction(); } diff --git a/bsp_q7s/boardtest/Q7STestTask.h b/bsp_q7s/boardtest/Q7STestTask.h index 9e39e8b3..dcfc3e96 100644 --- a/bsp_q7s/boardtest/Q7STestTask.h +++ b/bsp_q7s/boardtest/Q7STestTask.h @@ -18,6 +18,7 @@ class Q7STestTask : public TestTask { bool doTestScratchApi = false; static constexpr bool DO_TEST_GOMSPACE_API = false; static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = false; + static constexpr bool DO_TEST_FS_HANDLER = false; bool doTestGpsShm = false; bool doTestGpsSocket = false; bool doTestProtHandler = false; diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index df36df33..f6b9f9f3 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -73,6 +73,7 @@ void initmission::initTasks() { 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. PeriodicTaskIF* solarArrayDeplTask = factory->createPeriodicTask( @@ -81,6 +82,7 @@ void initmission::initTasks() { if (result != returnvalue::OK) { initmission::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER); } +#endif /* TMTC Distribution */ PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask( @@ -234,10 +236,12 @@ void initmission::initTasks() { initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); } #endif +#if OBSW_ADD_HEATERS == 1 result = tcsSystemTask->addComponent(objects::HEATER_HANDLER); if (result != returnvalue::OK) { initmission::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER); } +#endif #if OBSW_ADD_STAR_TRACKER == 1 PeriodicTaskIF* strHelperTask = factory->createPeriodicTask( @@ -313,7 +317,9 @@ void initmission::initTasks() { #endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ sysCtrlTask->startTask(); +#if OBSW_ADD_SA_DEPL == 1 solarArrayDeplTask->startTask(); +#endif taskStarter(pstTasks, "PST task vector"); taskStarter(pusTasks, "PUS task vector"); @@ -340,7 +346,9 @@ void initmission::initTasks() { tcsPollingTask->startTask(); tcsTask->startTask(); #endif /* OBSW_ADD_RTD_DEVICES == 1 */ - tcsSystemTask->startTask(); + if (not tcsSystemTask->isEmpty()) { + tcsSystemTask->startTask(); + } #if OBSW_ADD_PLOC_SUPERVISOR == 1 supvHelperTask->startTask(); #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index cc314e06..055113e9 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -35,6 +35,7 @@ void ObjectFactory::produce(void* args) { gpioCallbacks::disableAllDecoder(gpioComIF); PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0); + static_cast(pwrSwitcher); // Regular FM code, does not work for EM if the hardware is not connected // createPcduComponents(gpioComIF, &pwrSwitcher); diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 59f07d1f..6aa6f929 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -460,20 +460,18 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) { ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { // Length of a communication cycle uint32_t length = thisSequence->getPeriodMs(); - bool uartPstEmpty = true; - + static_cast(length); #if OBSW_ADD_PLOC_MPSOC == 1 - uartPstEmpty = false; thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); -#endif - thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); +#endif + #if OBSW_ADD_PLOC_SUPERVISOR == 1 thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); @@ -485,7 +483,6 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { #endif #if OBSW_ADD_SYRLINKS == 1 - uartPstEmpty = false; thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE); @@ -502,15 +499,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::STAR_TRACKER, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::STAR_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ); #endif - static_cast(length); - if (uartPstEmpty) { - return returnvalue::OK; - } - if (thisSequence->checkSequence() != returnvalue::OK) { - sif::error << "UART PST initialization failed" << std::endl; - return returnvalue::FAILED; - } - return returnvalue::OK; + return thisSequence->checkSequence(); } ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) { diff --git a/mission/devices/ImtqHandler.cpp b/mission/devices/ImtqHandler.cpp index d27b6f65..a0e717f8 100644 --- a/mission/devices/ImtqHandler.cpp +++ b/mission/devices/ImtqHandler.cpp @@ -321,7 +321,8 @@ ReturnValue_t ImtqHandler::scanForReply(const uint8_t* start, size_t remainingSi break; case (IMTQ::CC::PAST_AVAILABLE_RESPONSE_BYTES): { sif::warning << "IMTQHandler::scanForReply: Read 0xFF command byte, reading past available " - "bytes. Keep 1 ms delay between I2C send and read" << std::endl; + "bytes. Keep 1 ms delay between I2C send and read" + << std::endl; result = IGNORE_REPLY_DATA; break; }