some fixes, this should work now
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
This commit is contained in:
@ -103,6 +103,7 @@ void SolarArrayDeploymentHandler::handleStateMachine() {
|
||||
}
|
||||
sif::info << "S/A Deployment: Burning" << std::endl;
|
||||
triggerEvent(BURN_PHASE_START, fsmInfo.burnCountdownMs, fsmInfo.dryRun);
|
||||
channelAlternationCd.resetTimer();
|
||||
stateMachine = BURNING;
|
||||
}
|
||||
if (stateMachine == BURNING) {
|
||||
@ -219,7 +220,8 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
|
||||
if (stateSwitch or firstAutonomousCycle) {
|
||||
if (deplState == AutonomousDeplState::FIRST_BURN or
|
||||
deplState == AutonomousDeplState::SECOND_BURN) {
|
||||
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, dryRun);
|
||||
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, (config::SA_DEPL_BURN_TIME_SECS / 2) * 1000,
|
||||
dryRun);
|
||||
} else if (deplState == AutonomousDeplState::WAIT or deplState == AutonomousDeplState::DONE or
|
||||
deplState == AutonomousDeplState::INIT) {
|
||||
startFsmOff();
|
||||
@ -283,10 +285,12 @@ bool SolarArrayDeploymentHandler::checkMainPower(bool onOff) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs, bool dryRun) {
|
||||
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs,
|
||||
uint32_t channelAlternationIntervalMs, bool dryRun) {
|
||||
if (stateMachine != StateMachine::IDLE) {
|
||||
return false;
|
||||
}
|
||||
channelAlternationCd.setTimeout(channelAlternationIntervalMs);
|
||||
if (burnCountdownSecs > config::SA_DEPL_MAX_BURN_TIME) {
|
||||
burnCountdownSecs = config::SA_DEPL_MAX_BURN_TIME;
|
||||
}
|
||||
@ -354,8 +358,8 @@ ReturnValue_t SolarArrayDeploymentHandler::executeAction(ActionId_t actionId,
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint32_t burnCountdown = cmd.getBurnTime();
|
||||
if (not startFsmOn(burnCountdown, cmd.isDryRun())) {
|
||||
uint32_t burnCountdown = cmd.getBurnTimeSecs();
|
||||
if (not startFsmOn(burnCountdown, cmd.getSwitchIntervalMs(), cmd.isDryRun())) {
|
||||
return HasActionsIF::IS_BUSY;
|
||||
}
|
||||
actionActive = true;
|
||||
|
Reference in New Issue
Block a user