the sd stuff is evil..
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "PersistentLogTmStoreTask.h"
|
||||
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <fsfw/timemanager/Stopwatch.h>
|
||||
|
||||
PersistentLogTmStoreTask::PersistentLogTmStoreTask(object_id_t objectId, StorageManagerIF& ipcStore,
|
||||
LogStores stores, VirtualChannel& channel,
|
||||
@ -14,30 +15,30 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) {
|
||||
}
|
||||
bool someonesBusy = false;
|
||||
bool busy = false;
|
||||
busy = handleOneStore(stores.okStore);
|
||||
busy = handleOneStore(stores.okStore, tcHandlingCd);
|
||||
if (busy) {
|
||||
someonesBusy = true;
|
||||
}
|
||||
busy = handleOneStore(stores.notOkStore);
|
||||
busy = handleOneStore(stores.notOkStore, tcHandlingCd);
|
||||
if (busy) {
|
||||
someonesBusy = true;
|
||||
}
|
||||
|
||||
busy = handleOneStore(stores.miscStore);
|
||||
busy = handleOneStore(stores.miscStore, tcHandlingCd);
|
||||
if (busy) {
|
||||
someonesBusy = true;
|
||||
}
|
||||
if (not someonesBusy) {
|
||||
TaskFactory::delayTask(10);
|
||||
TaskFactory::delayTask(40);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PersistentLogTmStoreTask::initStoresIfPossible() {
|
||||
bool PersistentLogTmStoreTask::initStoresIfPossible() {
|
||||
if (sdcMan.isSdCardUsable(std::nullopt)) {
|
||||
stores.okStore.initializeTmStore();
|
||||
stores.miscStore.initializeTmStore();
|
||||
stores.notOkStore.initializeTmStore();
|
||||
storesInitialized = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user