minor fixes and additional printout
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2021-08-09 11:00:58 +02:00
parent 891ba6881b
commit f56c8ba1c0
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -205,6 +205,17 @@ ReturnValue_t CoreController::sdStateMachine() {
static_cast<int>(sdInfo.pref) << std::endl; static_cast<int>(sdInfo.pref) << std::endl;
#endif #endif
if(sdInfo.prefState == sd::SdState::MOUNTED) { if(sdInfo.prefState == sd::SdState::MOUNTED) {
#if OBSW_VERBOSE_LEVEL >= 1
std::string mountString;
if(sdInfo.pref == sd::SdCard::SLOT_0) {
mountString = SdCardManager::SD_0_MOUNT_POINT;
}
else {
mountString = SdCardManager::SD_1_MOUNT_POINT;
}
sif::info << "SD card " << sdInfo.prefChar << " already on and mounted at " <<
mountString << std::endl;
#endif
sdInfo.state = SdStates::DETERMINE_OTHER; sdInfo.state = SdStates::DETERMINE_OTHER;
} }
else if(sdInfo.prefState == sd::SdState::OFF) { else if(sdInfo.prefState == sd::SdState::OFF) {
@ -216,9 +227,10 @@ ReturnValue_t CoreController::sdStateMachine() {
} }
} }
else { else {
nonBlockingOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state"); if(nonBlockingOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state")) {
sdInfo.prefState = sd::SdState::ON; sdInfo.prefState = sd::SdState::ON;
currentStateSetter(sdInfo.pref, sd::SdState::ON); currentStateSetter(sdInfo.pref, sd::SdState::ON);
}
} }
} }
@ -284,10 +296,11 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.commandExecuted = true; sdInfo.commandExecuted = true;
} }
else { else {
nonBlockingOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10, if(nonBlockingOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10,
"Switching on other SD card"); "Switching on other SD card")) {
sdInfo.otherState = sd::SdState::ON; sdInfo.otherState = sd::SdState::ON;
currentStateSetter(sdInfo.other, sd::SdState::ON); currentStateSetter(sdInfo.other, sd::SdState::ON);
}
} }
#endif #endif
} }