This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user