v1.15.0 #311
@ -110,7 +110,7 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(const char* filename) {
|
||||
}
|
||||
} else if (lineNum == 1) {
|
||||
iss >> word;
|
||||
if (word.find("phase:") == string::npos) {
|
||||
if (word.find("secs_since_start:") == string::npos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -159,7 +159,20 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(const char* filename) {
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user