From ddeb9d37bd0f24557452085a3c5b514b71ab9299 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 6 Dec 2023 11:31:39 +0100 Subject: [PATCH] it's back! --- linux/scheduling.cpp | 32 ------------------- linux/scheduling.h | 1 - mission/payload/ScexDeviceHandler.cpp | 2 +- mission/pollingSeqTables.cpp | 8 ++++- mission/system/CMakeLists.txt | 2 +- mission/system/{tree => }/payloadModeTree.cpp | 0 mission/system/{tree => }/payloadModeTree.h | 0 mission/system/tree/CMakeLists.txt | 1 - 8 files changed, 9 insertions(+), 37 deletions(-) rename mission/system/{tree => }/payloadModeTree.cpp (100%) rename mission/system/{tree => }/payloadModeTree.h (100%) delete mode 100644 mission/system/tree/CMakeLists.txt diff --git a/linux/scheduling.cpp b/linux/scheduling.cpp index d1b7853f..28d15090 100644 --- a/linux/scheduling.cpp +++ b/linux/scheduling.cpp @@ -47,35 +47,3 @@ void scheduling::addMpsocSupvHandlers(PeriodicTaskIF* plTask) { plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::SEND_READ); plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::GET_READ); } - -void scheduling::scheduleScexDev(PeriodicTaskIF*& scexDevHandler) { - ReturnValue_t result = - scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::PERFORM_OPERATION); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } - result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_WRITE); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } - result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_WRITE); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } - result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_READ); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } - result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } - result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_READ); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } - result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ); - if (result != returnvalue::OK) { - printAddObjectError("SCEX_DEV", objects::SCEX); - } -} diff --git a/linux/scheduling.h b/linux/scheduling.h index d6c5b1f1..82cf4dc9 100644 --- a/linux/scheduling.h +++ b/linux/scheduling.h @@ -8,7 +8,6 @@ namespace scheduling { extern PosixThreadArgs RR_SCHEDULING; extern PosixThreadArgs NORMAL_SCHEDULING; -void scheduleScexDev(PeriodicTaskIF*& scexDevHandler); void scheduleScexReader(TaskFactory& factory, PeriodicTaskIF*& scexReaderTask); void addMpsocSupvHandlers(PeriodicTaskIF* task); } // namespace scheduling diff --git a/mission/payload/ScexDeviceHandler.cpp b/mission/payload/ScexDeviceHandler.cpp index ac668cdf..0d15c822 100644 --- a/mission/payload/ScexDeviceHandler.cpp +++ b/mission/payload/ScexDeviceHandler.cpp @@ -307,7 +307,7 @@ void ScexDeviceHandler::performOperationHook() { } } -uint32_t ScexDeviceHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return OK; } +uint32_t ScexDeviceHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 5000; } ReturnValue_t ScexDeviceHandler::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) { if (switchId) { diff --git a/mission/pollingSeqTables.cpp b/mission/pollingSeqTables.cpp index 1b369292..b6e99899 100644 --- a/mission/pollingSeqTables.cpp +++ b/mission/pollingSeqTables.cpp @@ -628,7 +628,13 @@ ReturnValue_t pst::pstPayload(FixedTimeslotTaskIF *thisSequence) { FreshSupvHandler::OpCode::PARSE_TM); thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.2, FreshSupvHandler::OpCode::PARSE_TM); - static_cast(length); + thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::SCEX, length * 0.6, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::SCEX, length * 0.8, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::SCEX, length * 0.8, DeviceHandlerIF::GET_READ); return thisSequence->checkSequence(); } diff --git a/mission/system/CMakeLists.txt b/mission/system/CMakeLists.txt index 116c0438..93adeb71 100644 --- a/mission/system/CMakeLists.txt +++ b/mission/system/CMakeLists.txt @@ -8,4 +8,4 @@ add_subdirectory(power) target_sources( ${LIB_EIVE_MISSION} PRIVATE systemTree.cpp DualLanePowerStateMachine.cpp EiveSystem.cpp - treeUtil.cpp SharedPowerAssemblyBase.cpp) + treeUtil.cpp SharedPowerAssemblyBase.cpp payloadModeTree.cpp) diff --git a/mission/system/tree/payloadModeTree.cpp b/mission/system/payloadModeTree.cpp similarity index 100% rename from mission/system/tree/payloadModeTree.cpp rename to mission/system/payloadModeTree.cpp diff --git a/mission/system/tree/payloadModeTree.h b/mission/system/payloadModeTree.h similarity index 100% rename from mission/system/tree/payloadModeTree.h rename to mission/system/payloadModeTree.h diff --git a/mission/system/tree/CMakeLists.txt b/mission/system/tree/CMakeLists.txt deleted file mode 100644 index 7b546846..00000000 --- a/mission/system/tree/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -target_sources(${LIB_EIVE_MISSION} PRIVATE payloadModeTree.cpp)