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:
@ -28,16 +28,20 @@ class ManualDeploymentCommand : public SerialLinkedListAdapter<SerializeIF> {
|
||||
ManualDeploymentCommand() { setLinks(); }
|
||||
|
||||
void setLinks() {
|
||||
setStart(&burnTime);
|
||||
burnTime.setNext(&dryRun);
|
||||
setStart(&burnTimeSecs);
|
||||
burnTimeSecs.setNext(&switchIntervalMs);
|
||||
burnTimeSecs.setNext(&dryRun);
|
||||
}
|
||||
|
||||
uint32_t getBurnTime() const { return burnTime.entry; }
|
||||
uint32_t getBurnTimeSecs() const { return burnTimeSecs.entry; }
|
||||
|
||||
uint32_t getSwitchIntervalMs() const { return switchIntervalMs.entry; };
|
||||
|
||||
bool isDryRun() const { return dryRun.entry; }
|
||||
|
||||
private:
|
||||
SerializeElement<uint32_t> burnTime;
|
||||
SerializeElement<uint32_t> burnTimeSecs;
|
||||
SerializeElement<uint32_t> switchIntervalMs;
|
||||
SerializeElement<uint8_t> dryRun;
|
||||
};
|
||||
|
||||
@ -50,7 +54,14 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
public SystemObject,
|
||||
public HasActionsIF {
|
||||
public:
|
||||
//! Manual deployment of the solar arrays. Burn time and channels are supplied with TC parameters
|
||||
//! Manual deployment of the solar arrays. Burn time, channel switch interval and dry run flag
|
||||
//! are supplied as parameters. There are following cases to consider
|
||||
//!
|
||||
//! - Channel switch interval greater or equal to burn time: Only burn one channel
|
||||
//! - Channel switch interval half of burn time: Burn each channel for half of the burn time.
|
||||
//!
|
||||
//! The dry run flag can be used to avoid actually toggling IO pins and only test the
|
||||
//! application logic.
|
||||
static constexpr DeviceCommandId_t DEPLOY_SOLAR_ARRAYS_MANUALLY = 0x05;
|
||||
static constexpr DeviceCommandId_t SWITCH_OFF_DEPLOYMENT = 0x06;
|
||||
|
||||
@ -157,7 +168,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||
uint8_t retryCounter = 3;
|
||||
|
||||
bool startFsmOn(uint32_t burnCountdownSecs, bool dryRun);
|
||||
bool startFsmOn(uint32_t burnCountdownSecs, uint32_t channelAlternationIntervalMs, bool dryRun);
|
||||
void startFsmOff();
|
||||
|
||||
void finishFsm(ReturnValue_t resultForActionHelper);
|
||||
@ -175,8 +186,9 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
*/
|
||||
Countdown burnCountdown;
|
||||
|
||||
// Only initial value, new approach is to burn each channel half of the total burn time.
|
||||
Countdown channelAlternationCd =
|
||||
Countdown(config::SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS * 1000);
|
||||
Countdown(config::LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS * 1000);
|
||||
|
||||
/**
|
||||
* The message queue id of the component commanding an action will be stored in this variable.
|
||||
|
Reference in New Issue
Block a user