From 4c57e4839947a92f8a795ab3be46466c7922c515 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 28 Mar 2023 21:58:04 +0200 Subject: [PATCH] cleaning up --- mission/tmtc/PersistentLogTmStoreTask.cpp | 7 +------ mission/tmtc/PersistentSingleTmStoreTask.cpp | 16 ---------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/mission/tmtc/PersistentLogTmStoreTask.cpp b/mission/tmtc/PersistentLogTmStoreTask.cpp index c13b88f6..dcd78b54 100644 --- a/mission/tmtc/PersistentLogTmStoreTask.cpp +++ b/mission/tmtc/PersistentLogTmStoreTask.cpp @@ -15,7 +15,6 @@ PersistentLogTmStoreTask::PersistentLogTmStoreTask(object_id_t objectId, Storage ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) { bool someonesBusy = false; bool vcBusyDuringDump = false; - bool byteFlowControl = false; auto stateHandlingForStore = [&](bool storeIsBusy, DumpContext& ctx) { if (storeIsBusy) { someonesBusy = true; @@ -26,10 +25,6 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) { if (ctx.vcBusyDuringDump) { vcBusyDuringDump = true; } - if (ctx.dumpedBytes - ctx.bytesDumpedAtLastDelay >= 2048) { - byteFlowControl = true; - ctx.bytesDumpedAtLastDelay = ctx.dumpedBytes; - } }; while (true) { if (not cyclicStoreCheck()) { @@ -45,7 +40,7 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) { TaskFactory::delayTask(100); } else if (vcBusyDuringDump) { // TODO: Might not be necessary - TaskFactory::delayTask(20); + TaskFactory::delayTask(10); } } } diff --git a/mission/tmtc/PersistentSingleTmStoreTask.cpp b/mission/tmtc/PersistentSingleTmStoreTask.cpp index 33492d43..a2d57208 100644 --- a/mission/tmtc/PersistentSingleTmStoreTask.cpp +++ b/mission/tmtc/PersistentSingleTmStoreTask.cpp @@ -11,11 +11,6 @@ PersistentSingleTmStoreTask::PersistentSingleTmStoreTask( dumpContext(eventIfDumpDone, eventIfCancelled) {} ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) { - ReturnValue_t result = returnvalue::OK; - uint32_t delaysVcBusyDuringDump = 0; - uint32_t delaysFlowControl = 0; - uint32_t delayNotBusy = 0; - uint32_t delayHotLoop = 0; while (true) { // Delay done by the check if (not cyclicStoreCheck()) { @@ -24,21 +19,10 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) { bool busy = handleOneStore(storeWithQueue, dumpContext); if (not busy) { TaskFactory::delayTask(100); - delayNotBusy++; } else if (dumpContext.vcBusyDuringDump) { // TODO: Might not be necessary - delaysVcBusyDuringDump++; TaskFactory::delayTask(10); - } else { - delayHotLoop++; } - // if ((delaysVcBusyDuringDump + delaysFlowControl + delayNotBusy + delayHotLoop) % 2000 == - // 0) { - // sif::debug << "DLY NBUSY: " << delayNotBusy << std::endl; - // sif::debug << "DLY FLCTRL: " << delaysFlowControl << std::endl; - // sif::debug << "DLY BUSYDUMP: " << delaysVcBusyDuringDump << std::endl; - // sif::debug << "DLY HOTLOOP: " << delayHotLoop << std::endl; - // } } }