initialize stores as well
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:
parent
33ac72de83
commit
130a3ce727
@ -57,6 +57,11 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
|
|||||||
packet.updateErrorControl();
|
packet.updateErrorControl();
|
||||||
|
|
||||||
if (sdcMan.isSdCardUsable(std::nullopt)) {
|
if (sdcMan.isSdCardUsable(std::nullopt)) {
|
||||||
|
if (not storesInitialized) {
|
||||||
|
miscStore.updateBaseDir();
|
||||||
|
miscStore.updateCurrentTimestamp();
|
||||||
|
storesInitialized = true;
|
||||||
|
}
|
||||||
miscStore.passPacket(packet);
|
miscStore.passPacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +99,10 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
|
|||||||
const char *PusTmFunnel::getName() const { return "PUS TM Funnel"; }
|
const char *PusTmFunnel::getName() const { return "PUS TM Funnel"; }
|
||||||
|
|
||||||
ReturnValue_t PusTmFunnel::initialize() {
|
ReturnValue_t PusTmFunnel::initialize() {
|
||||||
|
if (not storesInitialized and sdcMan.isSdCardUsable(std::nullopt)) {
|
||||||
miscStore.updateBaseDir();
|
miscStore.updateBaseDir();
|
||||||
miscStore.updateCurrentTimestamp();
|
miscStore.updateCurrentTimestamp();
|
||||||
|
storesInitialized = true;
|
||||||
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ class PusTmFunnel : public TmFunnelBase {
|
|||||||
private:
|
private:
|
||||||
uint16_t sourceSequenceCount = 0;
|
uint16_t sourceSequenceCount = 0;
|
||||||
TimeReaderIF &timeReader;
|
TimeReaderIF &timeReader;
|
||||||
|
bool storesInitialized = false;
|
||||||
TmStore miscStore;
|
TmStore miscStore;
|
||||||
SdCardMountedIF &sdcMan;
|
SdCardMountedIF &sdcMan;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user