From e4a227359ba510e3b1a8e0610eba3f039c06fa4a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 3 Feb 2023 15:02:08 +0100 Subject: [PATCH] some bugfixes, syrlinks needs to remain in PST cause of some bug --- bsp_q7s/core/scheduling.cpp | 15 +-------------- .../pollingsequence/pollingSequenceFactory.cpp | 13 +++++++++++-- .../pollingsequence/pollingSequenceFactory.h | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/bsp_q7s/core/scheduling.cpp b/bsp_q7s/core/scheduling.cpp index ad8990de..f5c7c558 100644 --- a/bsp_q7s/core/scheduling.cpp +++ b/bsp_q7s/core/scheduling.cpp @@ -150,19 +150,6 @@ void scheduling::initTasks() { scheduling::printAddObjectError("COM subsystem", objects::COM_SUBSYSTEM); } -#if OBSW_ADD_SYRLINKS == 1 - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::PERFORM_OPERATION); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_WRITE); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_WRITE); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_READ); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_READ); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::PERFORM_OPERATION); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_WRITE); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_WRITE); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_READ); - comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_READ); -#endif - #if OBSW_ADD_CCSDS_IP_CORES == 1 result = comTask->addComponent(objects::CCSDS_HANDLER); if (result != returnvalue::OK) { @@ -464,7 +451,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction #if OBSW_ADD_SPI_TEST_CODE == 0 FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask( "MAIN_SPI", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc); - result = pst::pstSpi(spiPst); + result = pst::pstSpiAndSyrlinks(spiPst); if (result != returnvalue::OK) { if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) { sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl; diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 0fd6cbfd..efbb9578 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -15,8 +15,17 @@ #define RPI_TEST_GPS_HANDLER 0 #endif -ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { +ReturnValue_t pst::pstSpiAndSyrlinks(FixedTimeslotTaskIF *thisSequence) { uint32_t length = thisSequence->getPeriodMs(); + +#if OBSW_ADD_SYRLINKS == 1 + thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); +#endif + static_cast(length); #if OBSW_ADD_PL_PCDU == 1 thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); @@ -312,7 +321,7 @@ ReturnValue_t pst::pstAcs(FixedTimeslotTaskIF *thisSequence) { DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0.0325, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0.4, + thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0.0325, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0.0325, DeviceHandlerIF::GET_READ); diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h index 2eadd19d..1dcfc30a 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h @@ -39,7 +39,7 @@ namespace pst { */ ReturnValue_t pstGompaceCan(FixedTimeslotTaskIF* thisSequence); -ReturnValue_t pstSpi(FixedTimeslotTaskIF* thisSequence); +ReturnValue_t pstSpiAndSyrlinks(FixedTimeslotTaskIF* thisSequence); ReturnValue_t pstAcs(FixedTimeslotTaskIF* thisSequence);