tested hot redundant config as well
This commit is contained in:
@ -60,19 +60,29 @@ private:
|
||||
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
uint32_t *msToReachTheMode);
|
||||
|
||||
// States for non-blocking setup
|
||||
// States for SD state machine, which is used in non-blocking mode
|
||||
enum class SdStates {
|
||||
NONE,
|
||||
START,
|
||||
GET_INFO,
|
||||
SET_STATE_SELF,
|
||||
MOUNT_SELF,
|
||||
// Determine operations for other SD card, depending on redundancy configuration
|
||||
DETERMINE_OTHER,
|
||||
SET_STATE_OTHER,
|
||||
// Mount or unmount other
|
||||
MOUNT_UNMOUNT_OTHER,
|
||||
// Skip period because the shell command used to generate the info file sometimes is
|
||||
// missing the last performed operation if executed too early
|
||||
SKIP_CYCLE_BEFORE_INFO_UPDATE,
|
||||
UPDATE_INFO,
|
||||
DONE
|
||||
// SD initialization done
|
||||
DONE,
|
||||
// Used if SD switches or mount commands are issued via telecommand
|
||||
SET_STATE_FROM_COMMAND,
|
||||
MOUNT_FROM_COMMAND,
|
||||
UNMOUNT_FROM_COMMAND,
|
||||
|
||||
};
|
||||
static constexpr bool BLOCKING_SD_INIT = false;
|
||||
|
||||
@ -93,6 +103,8 @@ private:
|
||||
bool initFinished = false;
|
||||
SdCardManager::SdStatePair currentState;
|
||||
uint16_t cycleCount = 0;
|
||||
sd::SdCard commandedCard = sd::SdCard::NONE;
|
||||
sd::SdState commandedState = sd::SdState::OFF;
|
||||
};
|
||||
|
||||
SdInfo sdInfo;
|
||||
|
Reference in New Issue
Block a user