Merge pull request 'SA DEPLY updates' (#488) from sa_deply_updates into develop
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
Reviewed-on: #488
This commit is contained in:
commit
024da6ceef
@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Fixed
|
||||
|
||||
- SA deployment file handling: Use exceptionless API.
|
||||
- Fix deadlock in SD card manager constructor: Double lock of preferred SD card lock.
|
||||
|
||||
## Added
|
||||
|
||||
- Failure of Safe Mode Ctrl will now trigger an event. As this can only be caused by sensors not
|
||||
|
@ -157,10 +157,14 @@ ReturnValue_t SolarArrayDeploymentHandler::performAutonomousDepl(sd::SdCard sdCa
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const char* filename,
|
||||
bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const char* infoFile,
|
||||
bool dryRun) {
|
||||
using namespace std;
|
||||
ifstream file(filename);
|
||||
std::error_code e;
|
||||
ifstream file(infoFile);
|
||||
if (file.bad()) {
|
||||
return false;
|
||||
}
|
||||
string line;
|
||||
string word;
|
||||
unsigned int lineNum = 0;
|
||||
@ -240,15 +244,18 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
|
||||
}
|
||||
}
|
||||
if (deplState == AutonomousDeplState::DONE) {
|
||||
remove(filename);
|
||||
std::filesystem::remove(infoFile, e);
|
||||
if (sdCard == sd::SdCard::SLOT_0) {
|
||||
remove(SD_0_DEPL_FILE);
|
||||
std::filesystem::remove(SD_0_DEPL_FILE, e);
|
||||
} else {
|
||||
remove(SD_1_DEPL_FILE);
|
||||
std::filesystem::remove(SD_1_DEPL_FILE, e);
|
||||
}
|
||||
triggerEvent(AUTONOMOUS_DEPLOYMENT_COMPLETED);
|
||||
} else {
|
||||
std::ofstream of(filename);
|
||||
std::ofstream of(infoFile);
|
||||
if (of.bad()) {
|
||||
return false;
|
||||
}
|
||||
of << "phase: ";
|
||||
if (deplState == AutonomousDeplState::INIT) {
|
||||
of << PHASE_INIT_STR << "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user