v1.14.0 #304
@ -384,6 +384,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
if (nonBlockingOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) {
|
if (nonBlockingOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) {
|
||||||
sdInfo.prefState = sd::SdState::MOUNTED;
|
sdInfo.prefState = sd::SdState::MOUNTED;
|
||||||
currentStateSetter(sdInfo.pref, sd::SdState::MOUNTED);
|
currentStateSetter(sdInfo.pref, sd::SdState::MOUNTED);
|
||||||
|
sdcMan->setActiveSdCard(sdInfo.pref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,13 +412,9 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SdCardManager::getCurrentMountPrefix() const {
|
const std::string& SdCardManager::getCurrentMountPrefix() const {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(mutex);
|
||||||
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
return currentPrefix;
|
||||||
return SD_0_MOUNT_POINT;
|
|
||||||
} else {
|
|
||||||
return SD_1_MOUNT_POINT;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations& currentOp) {
|
SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations& currentOp) {
|
||||||
@ -552,6 +548,14 @@ ReturnValue_t SdCardManager::performFsck(sd::SdCard sdcard, bool printOutput, in
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdCardManager::setActiveSdCard(sd::SdCard sdCard) { sdInfo.active = sdCard; }
|
void SdCardManager::setActiveSdCard(sd::SdCard sdCard) {
|
||||||
|
sdInfo.active = sdCard;
|
||||||
|
MutexGuard mg(mutex);
|
||||||
|
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
||||||
|
currentPrefix = SD_0_MOUNT_POINT;
|
||||||
|
} else {
|
||||||
|
currentPrefix = SD_1_MOUNT_POINT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sd::SdCard SdCardManager::getActiveSdCard() const { return sdInfo.active; }
|
sd::SdCard SdCardManager::getActiveSdCard() const { return sdInfo.active; }
|
||||||
|
@ -188,7 +188,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
* @param prefSdCardPtr
|
* @param prefSdCardPtr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
std::string getCurrentMountPrefix() const override;
|
const std::string& getCurrentMountPrefix() const override;
|
||||||
|
|
||||||
OpStatus checkCurrentOp(Operations& currentOp);
|
OpStatus checkCurrentOp(Operations& currentOp);
|
||||||
|
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit cfca27542a3cabf58f9b7cab238c89ab9ad9beea
|
Subproject commit cf8fe7ea728bea077b9936bcf0db96845bc6419e
|
@ -8,7 +8,7 @@
|
|||||||
class SdCardMountedIF {
|
class SdCardMountedIF {
|
||||||
public:
|
public:
|
||||||
virtual ~SdCardMountedIF(){};
|
virtual ~SdCardMountedIF(){};
|
||||||
virtual std::string getCurrentMountPrefix() const = 0;
|
virtual const std::string& getCurrentMountPrefix() const = 0;
|
||||||
virtual bool isSdCardMounted(sd::SdCard sdCard) = 0;
|
virtual bool isSdCardMounted(sd::SdCard sdCard) = 0;
|
||||||
virtual sd::SdCard getPreferredSdCard() const = 0;
|
virtual sd::SdCard getPreferredSdCard() const = 0;
|
||||||
virtual void setActiveSdCard(sd::SdCard sdCard) = 0;
|
virtual void setActiveSdCard(sd::SdCard sdCard) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user