added missing store initialization code
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
#include "TmStoreTaskBase.h"
|
||||
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
|
||||
TmStoreTaskBase::TmStoreTaskBase(object_id_t objectId, StorageManagerIF& ipcStore,
|
||||
VirtualChannel& channel)
|
||||
: SystemObject(objectId), ipcStore(ipcStore), channel(channel) {}
|
||||
VirtualChannel& channel, SdCardMountedIF& sdcMan)
|
||||
: SystemObject(objectId), ipcStore(ipcStore), channel(channel), sdcMan(sdcMan) {}
|
||||
|
||||
bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store) {
|
||||
bool tmToStoreReceived = true;
|
||||
@ -33,3 +35,22 @@ bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TmStoreTaskBase::cyclicStoreCheck() {
|
||||
if (not storesInitialized) {
|
||||
initStoresIfPossible();
|
||||
if (not storesInitialized) {
|
||||
TaskFactory::delayTask(400);
|
||||
return false;
|
||||
}
|
||||
} else if (sdCardCheckCd.hasTimedOut()) {
|
||||
if (not sdcMan.isSdCardUsable(std::nullopt)) {
|
||||
// Might be due to imminent shutdown or SD card switch.
|
||||
storesInitialized = false;
|
||||
TaskFactory::delayTask(100);
|
||||
return false;
|
||||
}
|
||||
sdCardCheckCd.resetTimer();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user