v1.15.0 #311
@ -213,7 +213,7 @@ void SolarArrayDeploymentHandler::handleStateMachine() {
|
||||
}
|
||||
}
|
||||
if (stateMachine == SWITCH_DEPL_GPIOS) {
|
||||
burnCountdown.setTimeout(fsmInfo.burnCountdown);
|
||||
burnCountdown.setTimeout(fsmInfo.burnCountdownMs);
|
||||
// This should never fail
|
||||
channelAlternationCd.resetTimer();
|
||||
if (not fsmInfo.dryRun) {
|
||||
@ -268,16 +268,16 @@ bool SolarArrayDeploymentHandler::checkMainPower(bool onOff) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdown_, bool dryRun) {
|
||||
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs, bool dryRun) {
|
||||
if (stateMachine != StateMachine::IDLE) {
|
||||
return false;
|
||||
}
|
||||
if (burnCountdown_ > config::SA_DEPL_MAX_BURN_TIME) {
|
||||
burnCountdown_ = config::SA_DEPL_MAX_BURN_TIME;
|
||||
if (burnCountdownSecs > config::SA_DEPL_MAX_BURN_TIME) {
|
||||
burnCountdownSecs = config::SA_DEPL_MAX_BURN_TIME;
|
||||
}
|
||||
fsmInfo.onOff = true;
|
||||
fsmInfo.dryRun = dryRun;
|
||||
fsmInfo.burnCountdown = burnCountdown_;
|
||||
fsmInfo.burnCountdownMs = burnCountdownSecs * 1000;
|
||||
stateMachine = StateMachine::MAIN_POWER_ON;
|
||||
retryCounter = 0;
|
||||
return true;
|
||||
@ -346,9 +346,11 @@ ReturnValue_t SolarArrayDeploymentHandler::executeAction(ActionId_t actionId,
|
||||
if (not startFsmOn(burnCountdown, cmd.isDryRun())) {
|
||||
return HasActionsIF::IS_BUSY;
|
||||
}
|
||||
actionActive = true;
|
||||
return result;
|
||||
} else if (actionId == SWITCH_OFF_DEPLOYMENT) {
|
||||
startFsmOff();
|
||||
actionActive = true;
|
||||
return result;
|
||||
} else {
|
||||
return HasActionsIF::INVALID_ACTION_ID;
|
||||
|
@ -123,7 +123,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
bool onOff;
|
||||
bool dryRun;
|
||||
bool alternationDummy = false;
|
||||
uint32_t burnCountdown = config::SA_DEPL_MAX_BURN_TIME;
|
||||
uint32_t burnCountdownMs = config::SA_DEPL_MAX_BURN_TIME;
|
||||
};
|
||||
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::SA_DEPL_HANDLER;
|
||||
@ -150,7 +150,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||
uint8_t retryCounter = 3;
|
||||
|
||||
bool startFsmOn(uint32_t burnCountdown, bool dryRun);
|
||||
bool startFsmOn(uint32_t burnCountdownSecs, bool dryRun);
|
||||
void startFsmOff();
|
||||
|
||||
void finishFsm(ReturnValue_t resultForActionHelper);
|
||||
|
Loading…
Reference in New Issue
Block a user