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;
#endif
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;
}
else if(sdInfo.prefState == sd::SdState::OFF) {
@ -216,11 +227,12 @@ ReturnValue_t CoreController::sdStateMachine() {
}
}
else {
nonBlockingOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state");
if(nonBlockingOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state")) {
sdInfo.prefState = sd::SdState::ON;
currentStateSetter(sdInfo.pref, sd::SdState::ON);
}
}
}
if(sdInfo.state == SdStates::MOUNT_SELF) {
if(not sdInfo.commandExecuted) {
@ -284,11 +296,12 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.commandExecuted = true;
}
else {
nonBlockingOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10,
"Switching on other SD card");
if(nonBlockingOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10,
"Switching on other SD card")) {
sdInfo.otherState = sd::SdState::ON;
currentStateSetter(sdInfo.other, sd::SdState::ON);
}
}
#endif
}