v1.15.0 #311

Merged
muellerr merged 107 commits from develop into main 2022-10-27 11:28:49 +02:00
Showing only changes of commit e1b3688869 - Show all commits

View File

@ -110,7 +110,7 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(const char* filename) {
} }
} else if (lineNum == 1) { } else if (lineNum == 1) {
iss >> word; iss >> word;
if (word.find("phase:") == string::npos) { if (word.find("secs_since_start:") == string::npos) {
return false; return false;
} }
@ -159,7 +159,20 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(const char* filename) {
} }
} }
if(stateSwitch or updateUptime) { if(stateSwitch or updateUptime) {
// TODO: Write new file here std::ofstream of(filename);
of << "phase: " ;
if(deplState == AutonomousDeplState::INIT) {
of << PHASE_INIT_STR << "\n";
} else if(deplState == AutonomousDeplState::FIRST_BURN) {
of << PHASE_FIRST_BURN_STR << "\n";
} else if(deplState == AutonomousDeplState::WAIT) {
of << PHASE_WAIT_STR << "\n";
} else if(deplState == AutonomousDeplState::SECOND_BURN) {
of << PHASE_SECOND_BURN_STR << "\n";
} else if(deplState == AutonomousDeplState::DONE) {
of << PHASE_DONE<< "\n";
}
of << "secs_since_start: " << std::to_string(secsSinceBoot) << "\n";
} }
return true; return true;
} }