SDC manager non-blocking mode
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#include "watchdogConf.h"
|
||||
|
||||
#include "fsfw/FSFWVersion.h"
|
||||
#include "fsfw/timemanager/Stopwatch.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
||||
#include "fsfw/osal/common/UdpTmTcBridge.h"
|
||||
@ -32,15 +33,11 @@ CoreController::CoreController(object_id_t objectId):
|
||||
sif::warning << "CoreController::CoreController: Watchdog FIFO init failed" <<
|
||||
std::endl;
|
||||
}
|
||||
result = initSdCard();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
|
||||
}
|
||||
|
||||
result = initBootCopy();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
catch(const std::filesystem::filesystem_error& e) {
|
||||
sif::error << "CoreController::CoreController: Failed with exception " <<
|
||||
@ -91,6 +88,7 @@ ReturnValue_t CoreController::initSdCard() {
|
||||
if(sdcMan == nullptr) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
||||
// Create update status file
|
||||
ReturnValue_t result = sdcMan->updateSdCardStateFile();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
@ -168,7 +166,17 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
||||
ReturnValue_t result = initVersionFile();
|
||||
|
||||
// TODO: Do this here because this can take a longer time. Later, use non-blocking mode
|
||||
// to start doing stuff in ctor and initialize function.
|
||||
// This operation can take 1-2 seconds on reboot, and around 50-100ms if the SD
|
||||
// card is already on.
|
||||
ReturnValue_t result = initSdCard();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
|
||||
}
|
||||
|
||||
result = initVersionFile();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "CoreController::initialize: Version initialization failed" << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user