the sd stuff is evil..
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <fsfw/timemanager/Stopwatch.h>
|
||||
#include <mission/tmtc/PersistentSingleTmStoreTask.h>
|
||||
|
||||
PersistentSingleTmStoreTask::PersistentSingleTmStoreTask(object_id_t objectId,
|
||||
@ -10,14 +11,21 @@ PersistentSingleTmStoreTask::PersistentSingleTmStoreTask(object_id_t objectId,
|
||||
|
||||
ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
|
||||
while (true) {
|
||||
// Delay done by the check
|
||||
if (not cyclicStoreCheck()) {
|
||||
continue;
|
||||
}
|
||||
bool busy = handleOneStore(storeWithQueue);
|
||||
bool busy = handleOneStore(storeWithQueue, tcHandlingCd);
|
||||
if (not busy) {
|
||||
TaskFactory::delayTask(10);
|
||||
TaskFactory::delayTask(40);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PersistentSingleTmStoreTask::initStoresIfPossible() {}
|
||||
bool PersistentSingleTmStoreTask::initStoresIfPossible() {
|
||||
if (sdcMan.isSdCardUsable(std::nullopt)) {
|
||||
storeWithQueue.initializeTmStore();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user