set pref sd as param
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2023-04-12 18:06:04 +02:00
parent 836ce9a6cd
commit 41ec6dc0f2
3 changed files with 57 additions and 2 deletions

View File

@ -4,6 +4,8 @@
#include <fsfw/container/DynamicFIFO.h>
#include <fsfw/container/SimpleRingBuffer.h>
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
#include <fsfw/parameters/ParameterHelper.h>
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
#include <libxiphos.h>
#include <mission/acs/archive/GPSDefinitions.h>
#include <mission/utility/trace.h>
@ -48,8 +50,14 @@ struct RebootFile {
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
};
class CoreController : public ExtendedControllerBase {
class CoreController : public ExtendedControllerBase,
public ReceivesParameterMessagesIF {
public:
enum ParamId: uint8_t {
PREF_SD = 0,
NUM_IDS
};
static xsc::Chip CURRENT_CHIP;
static xsc::Copy CURRENT_COPY;
@ -152,6 +160,7 @@ class CoreController : public ExtendedControllerBase {
SdCardManager* sdcMan = nullptr;
MessageQueueIF* eventQueue = nullptr;
uint8_t prefSdRaw = sd::SdCard::SLOT_0;
SdStates sdFsmState = SdStates::START;
SdStates fsmStateAfterDelay = SdStates::IDLE;
enum SdCfgMode { PASSIVE, COLD_REDUNDANT, HOT_REDUNDANT };
@ -216,10 +225,15 @@ class CoreController : public ExtendedControllerBase {
core::HkSet hkSet;
ParameterHelper paramHelper;
#if OBSW_SD_CARD_MUST_BE_ON == 1
bool remountAttemptFlag = true;
#endif
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueIdentifier,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;