Merge remote-tracking branch 'origin/develop' into mueller/pl-ss
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-11-09 15:15:57 +01:00
7 changed files with 33 additions and 19 deletions

View File

@ -47,10 +47,7 @@ CoreController::CoreController(object_id_t objectId)
sdcMan->setBlocking(false);
}
result = initBootCopy();
if (result != returnvalue::OK) {
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
}
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
} catch (const std::filesystem::filesystem_error &e) {
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
}
@ -95,9 +92,9 @@ void CoreController::performControlOperation() {
ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::TEMPERATURE, &tempPoolEntry);
localDataPoolMap.emplace(core::PS_VOLTAGE, &psVoltageEntry);
localDataPoolMap.emplace(core::PL_VOLTAGE, &plVoltageEntry);
poolManager.subscribeForRegularPeriodicPacket({hkSet.getSid(), false, 10.0});
return returnvalue::OK;
}
@ -175,8 +172,7 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
setenv("PATH", updatedEnvPath.c_str(), true);
updateProtInfo();
initPrint();
ExtendedControllerBase::initializeAfterTaskCreation();
return result;
return ExtendedControllerBase::initializeAfterTaskCreation();
}
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
@ -797,7 +793,7 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
return returnvalue::OK;
}
ReturnValue_t CoreController::initBootCopy() {
ReturnValue_t CoreController::initBootCopyFile() {
if (not std::filesystem::exists(CURR_COPY_FILE)) {
// This file is created by the systemd service eive-early-config so this should
// not happen normally
@ -807,8 +803,6 @@ ReturnValue_t CoreController::initBootCopy() {
utility::handleSystemError(result, "CoreController::initBootCopy");
}
}
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
return returnvalue::OK;
}
@ -1244,6 +1238,10 @@ void CoreController::performMountedSdCardOperations() {
std::filesystem::create_directory(path.str());
}
initVersionFile();
ReturnValue_t result = initBootCopyFile();
if (result != returnvalue::OK) {
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
}
initClockFromTimeFile();
performRebootFileHandling(false);
}

View File

@ -226,6 +226,10 @@ class CoreController : public ExtendedControllerBase {
PeriodicOperationDivider opDivider5;
PeriodicOperationDivider opDivider10;
PoolEntry<float> tempPoolEntry = PoolEntry<float>(0.0);
PoolEntry<float> psVoltageEntry = PoolEntry<float>(0.0);
PoolEntry<float> plVoltageEntry = PoolEntry<float>(0.0);
core::HkSet hkSet;
#if OBSW_SD_CARD_MUST_BE_ON == 1
@ -243,7 +247,7 @@ class CoreController : public ExtendedControllerBase {
ReturnValue_t initClockFromTimeFile();
ReturnValue_t performSdCardCheck();
ReturnValue_t timeFileHandler();
ReturnValue_t initBootCopy();
ReturnValue_t initBootCopyFile();
ReturnValue_t initWatchdogFifo();
ReturnValue_t initSdCardBlocking();
bool startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mode, MessageQueueId_t commander,