simplified SA Depl init
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-10-12 13:56:25 +02:00
parent ea82748496
commit 09c0afbe7f
5 changed files with 116 additions and 131 deletions

View File

@ -43,9 +43,9 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
* @param deplSA2 gpioId of the GPIO controlling the deployment 2 transistor.
* @param burnTimeMs Time duration the power will be applied to the burn wires.
*/
SolarArrayDeploymentHandler(object_id_t setObjectId, object_id_t gpioDriverId,
CookieIF* gpioCookie, PowerSwitchIF& mainLineSwitcher,
pcdu::Switches mainLineSwitch, gpioId_t deplSA1, gpioId_t deplSA2);
SolarArrayDeploymentHandler(object_id_t setObjectId, GpioIF& gpio,
PowerSwitchIF& mainLineSwitcher, pcdu::Switches mainLineSwitch,
gpioId_t deplSA1, gpioId_t deplSA2);
virtual ~SolarArrayDeploymentHandler();
@ -71,16 +71,16 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
static const Event DEPL_SA1_GPIO_SWTICH_ON_FAILED = MAKE_EVENT(3, severity::HIGH);
static const Event DEPL_SA2_GPIO_SWTICH_ON_FAILED = MAKE_EVENT(4, severity::HIGH);
// enum StateMachine {
// WAIT_ON_DELOYMENT_COMMAND,
// SWITCH_8V_ON,
// WAIT_ON_8V_SWITCH,
// SWITCH_DEPL_GPIOS,
// WAIT_ON_DEPLOYMENT_FINISH,
// WAIT_FOR_MAIN_SWITCH_OFF
// };
//
// StateMachine stateMachine = WAIT_ON_DELOYMENT_COMMAND;
// enum StateMachine {
// WAIT_ON_DELOYMENT_COMMAND,
// SWITCH_8V_ON,
// WAIT_ON_8V_SWITCH,
// SWITCH_DEPL_GPIOS,
// WAIT_ON_DEPLOYMENT_FINISH,
// WAIT_FOR_MAIN_SWITCH_OFF
// };
//
// StateMachine stateMachine = WAIT_ON_DELOYMENT_COMMAND;
/**
* This countdown is used to check if the PCDU sets the 8V line on in the intended time.
@ -90,7 +90,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
/**
* This countdown is used to wait for the burn wire being successful cut.
*/
//Countdown deploymentCountdown;
// Countdown deploymentCountdown;
/**
* The message queue id of the component commanding an action will be stored in this variable.
@ -100,17 +100,10 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
/** Size of command queue */
size_t cmdQueueSize = 20;
/** The object ID of the GPIO driver which switches the deployment transistors */
object_id_t gpioDriverId;
CookieIF* gpioCookie;
GpioIF& gpioInterface;
gpioId_t deplSA1;
gpioId_t deplSA2;
GpioIF* gpioInterface = nullptr;
/** Queue to receive messages from other objects. */
MessageQueueIF* commandQueue = nullptr;
@ -146,7 +139,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
* @brief This function performs actions to finish the deployment. Essentially switches
* are turned of after the burn time has expired.
*/
//void handleDeploymentFinish();
// void handleDeploymentFinish();
};
#endif /* MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_ */