implemented alternating GPIO SA Deployment
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -42,10 +42,13 @@ class ManualDeploymentCommand : public SerialLinkedListAdapter<SerializeIF> {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
|
||||
bool isDryRun() const { return dryRun.entry; }
|
||||
|
||||
private:
|
||||
SerializeElement<uint32_t> burnTime;
|
||||
// Deployment channel SA1 or SA2
|
||||
SerializeElement<uint8_t> channel;
|
||||
SerializeElement<uint8_t> dryRun;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -61,7 +64,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
static constexpr DeviceCommandId_t DEPLOY_SOLAR_ARRAYS_MANUALLY = 0x05;
|
||||
static constexpr DeviceCommandId_t SWITCH_OFF_DEPLOYMENT = 0x06;
|
||||
|
||||
static constexpr uint32_t FIRST_BURN_START_TIME = config::SA_DEPL_BURN_TIME_SECS;
|
||||
static constexpr uint32_t FIRST_BURN_START_TIME = config::SA_DEPL_INIT_BUFFER_SECS;
|
||||
static constexpr uint32_t FIRST_BURN_END_TIME =
|
||||
FIRST_BURN_START_TIME + config::SA_DEPL_BURN_TIME_SECS;
|
||||
static constexpr uint32_t WAIT_START_TIME = FIRST_BURN_END_TIME;
|
||||
@ -118,14 +121,16 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
WAIT_MAIN_POWER_ON,
|
||||
WAIT_MAIN_POWER_OFF,
|
||||
SWITCH_DEPL_GPIOS,
|
||||
CHANNEL_ON
|
||||
BURNING
|
||||
};
|
||||
|
||||
struct FsmInfo {
|
||||
DeploymentChannels channel;
|
||||
// Not required anymore
|
||||
// DeploymentChannels channel;
|
||||
// false if OFF, true is ON
|
||||
bool onOff;
|
||||
bool dryRun;
|
||||
bool alternationDummy = false;
|
||||
uint32_t burnCountdown = config::SA_DEPL_MAX_BURN_TIME;
|
||||
};
|
||||
|
||||
@ -153,13 +158,14 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||
uint8_t retryCounter = 3;
|
||||
|
||||
bool startFsmOn(DeploymentChannels channel, uint32_t burnCountdown);
|
||||
bool startFsmOn(uint32_t burnCountdown, bool dryRun);
|
||||
void startFsmOff();
|
||||
|
||||
void finishFsm(ReturnValue_t resultForActionHelper);
|
||||
|
||||
ReturnValue_t performAutonomousDepl(sd::SdCard sdCard);
|
||||
bool autonomousDeplForFile(const char* filename);
|
||||
ReturnValue_t performAutonomousDepl(sd::SdCard sdCard, bool dryRun);
|
||||
bool dryRunStringInFile(const char* filename);
|
||||
bool autonomousDeplForFile(const char* filename, bool dryRun);
|
||||
/**
|
||||
* This countdown is used to check if the PCDU sets the 8V line on in the intended time.
|
||||
*/
|
||||
@ -170,6 +176,8 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
*/
|
||||
Countdown burnCountdown;
|
||||
|
||||
Countdown channelAlternationCd = Countdown(config::SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS);
|
||||
|
||||
/**
|
||||
* The message queue id of the component commanding an action will be stored in this variable.
|
||||
* This is necessary to send later the action finish replies.
|
||||
@ -214,11 +222,12 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
|
||||
void allOff();
|
||||
|
||||
/**
|
||||
* @brief This functions handles the switching of the solar array deployment transistors.
|
||||
*/
|
||||
ReturnValue_t deploymentTransistorsOn(DeploymentChannels channel);
|
||||
ReturnValue_t deploymentTransistorsOff(DeploymentChannels channel);
|
||||
ReturnValue_t deploymentTransistorsOff();
|
||||
ReturnValue_t saGpioAlternation();
|
||||
ReturnValue_t sa1On();
|
||||
ReturnValue_t sa1Off();
|
||||
ReturnValue_t sa2On();
|
||||
ReturnValue_t sa2Off();
|
||||
};
|
||||
|
||||
#endif /* MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_ */
|
||||
|
Reference in New Issue
Block a user