some fixes, this should work now #347
@ -22,6 +22,11 @@ list yields a list of all related PRs for each release.
|
|||||||
- The ACS Controller Gyro Sets (raw and processed) and the MEKF dataset are diagnostics now.
|
- The ACS Controller Gyro Sets (raw and processed) and the MEKF dataset are diagnostics now.
|
||||||
- Bumped FSFW for Service 11 improvement which includes size and CRC check for contained TC
|
- Bumped FSFW for Service 11 improvement which includes size and CRC check for contained TC
|
||||||
- Syrlinks module now always included for both EM and FM
|
- Syrlinks module now always included for both EM and FM
|
||||||
|
- SA Deployment: Allow specifying the switch interval and the initial channel. This allows testing
|
||||||
|
the new deployment procedure where each channel is burned for half of the whole burn duration.
|
||||||
|
It also allows burning only one channel for the whole burn duration. The autonomous mechanism
|
||||||
|
was adapted to burn each channel for half of the burn time by default.
|
||||||
|
PR:
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
@ -97,9 +97,15 @@ void SolarArrayDeploymentHandler::handleStateMachine() {
|
|||||||
// This should never fail
|
// This should never fail
|
||||||
channelAlternationCd.resetTimer();
|
channelAlternationCd.resetTimer();
|
||||||
if (not fsmInfo.dryRun) {
|
if (not fsmInfo.dryRun) {
|
||||||
sa2Off();
|
if (fsmInfo.initChannel == 0) {
|
||||||
sa1On();
|
sa2Off();
|
||||||
fsmInfo.alternationDummy = true;
|
sa1On();
|
||||||
|
fsmInfo.alternationDummy = true;
|
||||||
|
} else {
|
||||||
|
sa1Off();
|
||||||
|
sa2On();
|
||||||
|
fsmInfo.alternationDummy = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sif::info << "S/A Deployment: Burning" << std::endl;
|
sif::info << "S/A Deployment: Burning" << std::endl;
|
||||||
triggerEvent(BURN_PHASE_START, fsmInfo.burnCountdownMs, fsmInfo.dryRun);
|
triggerEvent(BURN_PHASE_START, fsmInfo.burnCountdownMs, fsmInfo.dryRun);
|
||||||
@ -220,7 +226,7 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
|
|||||||
if (stateSwitch or firstAutonomousCycle) {
|
if (stateSwitch or firstAutonomousCycle) {
|
||||||
if (deplState == AutonomousDeplState::FIRST_BURN or
|
if (deplState == AutonomousDeplState::FIRST_BURN or
|
||||||
deplState == AutonomousDeplState::SECOND_BURN) {
|
deplState == AutonomousDeplState::SECOND_BURN) {
|
||||||
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, (config::SA_DEPL_BURN_TIME_SECS / 2) * 1000,
|
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, (config::SA_DEPL_BURN_TIME_SECS / 2) * 1000, 0,
|
||||||
dryRun);
|
dryRun);
|
||||||
} else if (deplState == AutonomousDeplState::WAIT or deplState == AutonomousDeplState::DONE or
|
} else if (deplState == AutonomousDeplState::WAIT or deplState == AutonomousDeplState::DONE or
|
||||||
deplState == AutonomousDeplState::INIT) {
|
deplState == AutonomousDeplState::INIT) {
|
||||||
@ -286,7 +292,8 @@ bool SolarArrayDeploymentHandler::checkMainPower(bool onOff) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs,
|
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs,
|
||||||
uint32_t channelAlternationIntervalMs, bool dryRun) {
|
uint32_t channelAlternationIntervalMs,
|
||||||
|
uint8_t initChannel, bool dryRun) {
|
||||||
if (stateMachine != StateMachine::IDLE) {
|
if (stateMachine != StateMachine::IDLE) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -296,6 +303,7 @@ bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs,
|
|||||||
}
|
}
|
||||||
fsmInfo.dryRun = dryRun;
|
fsmInfo.dryRun = dryRun;
|
||||||
fsmInfo.burnCountdownMs = burnCountdownSecs * 1000;
|
fsmInfo.burnCountdownMs = burnCountdownSecs * 1000;
|
||||||
|
fsmInfo.initChannel = initChannel;
|
||||||
stateMachine = StateMachine::MAIN_POWER_ON;
|
stateMachine = StateMachine::MAIN_POWER_ON;
|
||||||
retryCounter = 0;
|
retryCounter = 0;
|
||||||
return true;
|
return true;
|
||||||
@ -359,7 +367,8 @@ ReturnValue_t SolarArrayDeploymentHandler::executeAction(ActionId_t actionId,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uint32_t burnCountdown = cmd.getBurnTimeSecs();
|
uint32_t burnCountdown = cmd.getBurnTimeSecs();
|
||||||
if (not startFsmOn(burnCountdown, cmd.getSwitchIntervalMs(), cmd.isDryRun())) {
|
if (not startFsmOn(burnCountdown, cmd.getSwitchIntervalMs(), cmd.getInitChannel(),
|
||||||
|
cmd.isDryRun())) {
|
||||||
return HasActionsIF::IS_BUSY;
|
return HasActionsIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
actionActive = true;
|
actionActive = true;
|
||||||
|
@ -30,18 +30,22 @@ class ManualDeploymentCommand : public SerialLinkedListAdapter<SerializeIF> {
|
|||||||
void setLinks() {
|
void setLinks() {
|
||||||
setStart(&burnTimeSecs);
|
setStart(&burnTimeSecs);
|
||||||
burnTimeSecs.setNext(&switchIntervalMs);
|
burnTimeSecs.setNext(&switchIntervalMs);
|
||||||
burnTimeSecs.setNext(&dryRun);
|
switchIntervalMs.setNext(&initChannel);
|
||||||
|
initChannel.setNext(&dryRun);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getBurnTimeSecs() const { return burnTimeSecs.entry; }
|
uint32_t getBurnTimeSecs() const { return burnTimeSecs.entry; }
|
||||||
|
|
||||||
uint32_t getSwitchIntervalMs() const { return switchIntervalMs.entry; };
|
uint32_t getSwitchIntervalMs() const { return switchIntervalMs.entry; };
|
||||||
|
|
||||||
|
uint8_t getInitChannel() const { return initChannel.entry; };
|
||||||
|
|
||||||
bool isDryRun() const { return dryRun.entry; }
|
bool isDryRun() const { return dryRun.entry; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SerializeElement<uint32_t> burnTimeSecs;
|
SerializeElement<uint32_t> burnTimeSecs;
|
||||||
SerializeElement<uint32_t> switchIntervalMs;
|
SerializeElement<uint32_t> switchIntervalMs;
|
||||||
|
SerializeElement<uint8_t> initChannel;
|
||||||
SerializeElement<uint8_t> dryRun;
|
SerializeElement<uint8_t> dryRun;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -130,6 +134,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
// DeploymentChannels channel;
|
// DeploymentChannels channel;
|
||||||
bool dryRun;
|
bool dryRun;
|
||||||
bool alternationDummy = false;
|
bool alternationDummy = false;
|
||||||
|
uint8_t initChannel = 0;
|
||||||
uint32_t burnCountdownMs = config::SA_DEPL_MAX_BURN_TIME;
|
uint32_t burnCountdownMs = config::SA_DEPL_MAX_BURN_TIME;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -168,7 +173,8 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||||
uint8_t retryCounter = 3;
|
uint8_t retryCounter = 3;
|
||||||
|
|
||||||
bool startFsmOn(uint32_t burnCountdownSecs, uint32_t channelAlternationIntervalMs, bool dryRun);
|
bool startFsmOn(uint32_t burnCountdownSecs, uint32_t channelAlternationIntervalMs,
|
||||||
|
uint8_t initChannel, bool dryRun);
|
||||||
void startFsmOff();
|
void startFsmOff();
|
||||||
|
|
||||||
void finishFsm(ReturnValue_t resultForActionHelper);
|
void finishFsm(ReturnValue_t resultForActionHelper);
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 2b5ad32fdd56d38e8318027b67d091d9e0ea3aba
|
Subproject commit 912728474a11b6ccb86ce61c3aa802d931caac68
|
Loading…
x
Reference in New Issue
Block a user