sd card is now mounted as well

This commit is contained in:
2021-07-12 13:26:02 +02:00
committed by Robin Mueller
parent bf2a4d0ad7
commit 37feaa0a54
3 changed files with 28 additions and 11 deletions

View File

@ -39,9 +39,18 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
return result;
}
if(sdCard == sd::SdCard::SLOT_0) {
if(active.first == sd::SdStatus::ON or active.first == sd::SdStatus::MOUNTED) {
return ALREADY_ON;
if(active.first == sd::SdStatus::MOUNTED) {
return ALREADY_MOUNTED;
}
else if(active.first == sd::SdStatus::ON) {
if(not doMountSdCard) {
return ALREADY_ON;
}
else {
return mountSdCard(sdCard);
}
}
}
else if(sdCard == sd::SdCard::SLOT_1) {
if(active.second == sd::SdStatus::ON or active.second == sd::SdStatus::MOUNTED) {