fix one shot flag
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details

This commit is contained in:
Robin Müller 2022-10-14 15:05:44 +02:00
parent 3cff1c48e9
commit e9a4c63127
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 5 additions and 5 deletions

View File

@ -54,9 +54,6 @@ ReturnValue_t SolarArrayDeploymentHandler::performOperation(uint8_t operationCod
}
readCommandQueue();
handleStateMachine();
if (firstCycle) {
firstCycle = false;
}
return returnvalue::OK;
}
@ -214,7 +211,7 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
}
// Uptime has increased by X seconds so we need to update the uptime count inside the file
secsSinceBoot += Clock::getUptime().tv_sec;
if (stateSwitch or firstCycle) {
if (stateSwitch or firstAutonomousCycle) {
if (deplState == AutonomousDeplState::FIRST_BURN or
deplState == AutonomousDeplState::SECOND_BURN) {
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, dryRun);
@ -245,6 +242,9 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
}
of << "secs_since_start: " << std::to_string(secsSinceBoot) << "\n";
}
if (firstAutonomousCycle) {
firstAutonomousCycle = false;
}
return true;
}

View File

@ -151,7 +151,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
FsmInfo fsmInfo;
StateMachine stateMachine = IDLE;
bool actionActive = false;
bool firstCycle = true;
bool firstAutonomousCycle = true;
ActionId_t activeCmd = HasActionsIF::INVALID_ACTION_ID;
std::optional<uint64_t> initUptime;
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);