basic SD card remount FDIR
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "OBSWVersion.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#include "fsfw/timemanager/Stopwatch.h"
|
||||
@ -1243,16 +1242,16 @@ void CoreController::performMountedSdCardOperations() {
|
||||
}
|
||||
timeFileHandler();
|
||||
};
|
||||
bool clearOneShotFlag = false;
|
||||
bool someSdCardActive = false;
|
||||
if (sdInfo.active == sd::SdCard::SLOT_0 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_0)) {
|
||||
mountedSdCardOp(sd::SdCard::SLOT_0, config::SD_0_MOUNT_POINT);
|
||||
clearOneShotFlag = true;
|
||||
someSdCardActive = true;
|
||||
}
|
||||
if (sdInfo.active == sd::SdCard::SLOT_1 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_1)) {
|
||||
mountedSdCardOp(sd::SdCard::SLOT_1, config::SD_1_MOUNT_POINT);
|
||||
clearOneShotFlag = true;
|
||||
someSdCardActive = true;
|
||||
}
|
||||
if (clearOneShotFlag) {
|
||||
if (someSdCardActive) {
|
||||
performOneShotSdCardOpsSwitch = true;
|
||||
}
|
||||
}
|
||||
@ -1295,7 +1294,19 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
||||
if (active.second == sd::SdState::MOUNTED) {
|
||||
sdCardCheck(sd::SdCard::SLOT_1);
|
||||
}
|
||||
|
||||
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||
// This is FDIR. The core controller will attempt once to get some SD card working
|
||||
bool someSdCardActive = false;
|
||||
if ((sdInfo.active == sd::SdCard::SLOT_0 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_0)) or
|
||||
(sdInfo.active == sd::SdCard::SLOT_1 and sdcMan->isSdCardUsable(sd::SdCard::SLOT_1))) {
|
||||
someSdCardActive = true;
|
||||
}
|
||||
if (not someSdCardActive and remountAttemptFlag) {
|
||||
triggerEvent(NO_SD_CARD_ACTIVE);
|
||||
initSdCardBlocking();
|
||||
remountAttemptFlag = false;
|
||||
}
|
||||
#endif
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user