tweaks and fixes for state machine
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2021-08-08 12:43:02 +02:00
parent 51dbc95750
commit 365fa0adc4
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -38,10 +38,11 @@ CoreController::CoreController(object_id_t objectId):
if(sdcMan == nullptr) {
sif::error << "CoreController::CoreController: SD card manager invalid!" << std::endl;
}
if(not BLOCKING_SD_INIT) {
sdStateMachine();
sdcMan->setBlocking(false);
}
sdStateMachine();
result = initBootCopy();
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -59,7 +60,7 @@ ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
}
void CoreController::performControlOperation() {
if(not BLOCKING_SD_INIT and not sdInfo.initFinished) {
if(not BLOCKING_SD_INIT) {
sdStateMachine();
}
performWatchdogControlOperation();
@ -83,9 +84,8 @@ ReturnValue_t CoreController::initialize() {
"count failed" << std::endl;
}
if(not BLOCKING_SD_INIT) {
sdStateMachine();
}
sdStateMachine();
return ExtendedControllerBase::initialize();
}
@ -150,6 +150,13 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.initFinished = true;
return result;
#else
// Init will be performed by separate function
if(not BLOCKING_SD_INIT) {
sdInfo.state = SdStates::IDLE;
sdInfo.initFinished = true;
return result;
}
#endif
sdInfo.cycleCount = 0;
sdInfo.commandExecuted = false;
sdInfo.state = SdStates::GET_INFO;