v1.15.0 #311
@ -20,7 +20,6 @@
|
||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||
#define OBSW_TC_FROM_PDEC 0
|
||||
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@
|
||||
#define OBSW_ADD_MGT @OBSW_ADD_MGT@
|
||||
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
|
||||
@ -41,7 +40,11 @@
|
||||
#define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@
|
||||
#define OBSW_ADD_SYRLINKS @OBSW_ADD_SYRLINKS@
|
||||
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
|
||||
#define OBSW_MPSOC_JTAG_BOOT 0
|
||||
|
||||
// Configuration parameter which causes the core controller to try to keep at least one SD card
|
||||
// working
|
||||
#define OBSW_SD_CARD_MUST_BE_ON 1
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
|
||||
// This is a really tricky switch.. It initializes the PCDU switches to their default states
|
||||
// at powerup. I think it would be better
|
||||
@ -59,6 +62,7 @@
|
||||
#define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1
|
||||
#define OBSW_PRINT_MISSED_DEADLINES 1
|
||||
|
||||
#define OBSW_MPSOC_JTAG_BOOT 0
|
||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
||||
#define OBSW_SYRLINKS_SIMULATED 1
|
||||
#define OBSW_ADD_TEST_CODE 0
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include "CoreDefinitions.h"
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||
@ -102,6 +103,9 @@ class CoreController : public ExtendedControllerBase {
|
||||
event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
|
||||
//! Trying to find a way how to determine that the reboot came from ProASIC3 or PCDU..
|
||||
static constexpr Event REBOOT_HW = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
|
||||
//! [EXPORT] : [COMMENT] No SD card was active. Core controller will attempt to re-initialize
|
||||
//! a SD card.
|
||||
static constexpr Event NO_SD_CARD_ACTIVE = event::makeEvent(SUBSYSTEM_ID, 4, severity::HIGH);
|
||||
|
||||
CoreController(object_id_t objectId);
|
||||
virtual ~CoreController();
|
||||
@ -219,6 +223,10 @@ class CoreController : public ExtendedControllerBase {
|
||||
|
||||
core::HkSet hkSet;
|
||||
|
||||
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||
bool remountAttemptFlag = true;
|
||||
#endif
|
||||
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
Countdown sdCardCheckCd = Countdown(120000);
|
||||
|
@ -50,6 +50,10 @@ ReturnValue_t SolarArrayDeploymentHandler::performOperation(uint8_t operationCod
|
||||
// perform autonomous deployment handling
|
||||
performAutonomousDepl(sd::SdCard::SLOT_1, dryRunStringInFile(SD_1_DEPL_FILE));
|
||||
}
|
||||
} else {
|
||||
// TODO: This is FDIR domain. If both SD cards are not available for whatever reason,
|
||||
// there is not much we can do except somehow use the scratch buffer which is
|
||||
// not non-volatile. Implementation effort is considerable as well.
|
||||
}
|
||||
}
|
||||
readCommandQueue();
|
||||
|
Loading…
Reference in New Issue
Block a user