found the bug
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-10-04 23:04:50 +02:00
parent a44141c476
commit 1a192cd8fb
8 changed files with 60 additions and 44 deletions

View File

@ -5,10 +5,10 @@
#include <algorithm>
#include <ctime>
#include <iostream>
#include <fstream>
#include <random>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <random>
#include "fsfw/globalfunctions/CRC.h"
#include "mission/devices/devicedefinitions/ScexDefinitions.h"
@ -24,7 +24,10 @@ ScexDeviceHandler::~ScexDeviceHandler() {}
void ScexDeviceHandler::doStartUp() { setMode(MODE_ON); }
void ScexDeviceHandler::doShutDown() { setMode(_MODE_POWER_DOWN); }
void ScexDeviceHandler::doShutDown() {
reader.reset();
setMode(_MODE_POWER_DOWN);
}
ReturnValue_t ScexDeviceHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { return OK; }
@ -348,18 +351,16 @@ void ScexDeviceHandler::modeChanged() {}
void ScexDeviceHandler::setPowerSwitcher(PowerSwitchIF& powerSwitcher, power::Switch_t switchId) {
DeviceHandlerBase::setPowerSwitcher(&powerSwitcher);
this->switchId = switchId;
}
ReturnValue_t ScexDeviceHandler::initializeAfterTaskCreation() {
auto mntPrefix = sdcMan.getCurrentMountPrefix();
std::filesystem::path fullFilePath = mntPrefix;
fullFilePath /= "scex";
bool fileExists = std::filesystem::exists(fullFilePath);
auto mntPrefix = sdcMan.getCurrentMountPrefix();
std::filesystem::path fullFilePath = mntPrefix;
fullFilePath /= "scex";
bool fileExists = std::filesystem::exists(fullFilePath);
if(not fileExists){
std::filesystem::create_directory(fullFilePath);
}
return DeviceHandlerBase::initializeAfterTaskCreation();
if (not fileExists) {
std::filesystem::create_directory(fullFilePath);
}
return DeviceHandlerBase::initializeAfterTaskCreation();
}