change to more generic type
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:
parent
74fa98d161
commit
f88a063d83
@ -3,12 +3,15 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
|
#include <fsfw/power/definitions.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace pcduSwitches {
|
namespace pcduSwitches {
|
||||||
|
|
||||||
/* Switches are uint8_t datatype and go from 0 to 255 */
|
/* Switches are uint8_t datatype and go from 0 to 255 */
|
||||||
enum Switches: uint8_t {
|
enum Switches: power::Switch_t {
|
||||||
PDU1_CH0_TCS_BOARD_3V3,
|
PDU1_CH0_TCS_BOARD_3V3,
|
||||||
PDU1_CH1_SYRLINKS_12V,
|
PDU1_CH1_SYRLINKS_12V,
|
||||||
PDU1_CH2_STAR_TRACKER_5V,
|
PDU1_CH2_STAR_TRACKER_5V,
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
PayloadPcduHandler::PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie,
|
PayloadPcduHandler::PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie,
|
||||||
GpioIF* gpioIF, SdCardMountedIF* sdcMan,
|
GpioIF* gpioIF, SdCardMountedIF* sdcMan,
|
||||||
PowerSwitchIF* pwrSwitcher, pcduSwitches::Switches switchA,
|
PowerSwitchIF* pwrSwitcher, power::Switch_t switchA,
|
||||||
pcduSwitches::Switches switchB, bool periodicPrintout)
|
power::Switch_t switchB, bool periodicPrintout)
|
||||||
: DeviceHandlerBase(objectId, comIF, cookie),
|
: DeviceHandlerBase(objectId, comIF, cookie),
|
||||||
adcSet(this),
|
adcSet(this),
|
||||||
periodicPrintout(periodicPrintout),
|
periodicPrintout(periodicPrintout),
|
||||||
|
@ -61,9 +61,8 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
|||||||
static constexpr Event I_HPA_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 11, severity::MEDIUM);
|
static constexpr Event I_HPA_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 11, severity::MEDIUM);
|
||||||
|
|
||||||
PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie, GpioIF* gpioIF,
|
PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie, GpioIF* gpioIF,
|
||||||
SdCardMountedIF* sdcMan, PowerSwitchIF* pwrSwitcher,
|
SdCardMountedIF* sdcMan, PowerSwitchIF* pwrSwitcher, power::Switch_t switchCh0,
|
||||||
pcduSwitches::Switches switchA, pcduSwitches::Switches switchB,
|
power::Switch_t switchCh1, bool periodicPrintout);
|
||||||
bool periodicPrintout);
|
|
||||||
|
|
||||||
void setToGoToNormalModeImmediately(bool enable);
|
void setToGoToNormalModeImmediately(bool enable);
|
||||||
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include <fsfw/devicehandlers/AssemblyBase.h>
|
#include <fsfw/devicehandlers/AssemblyBase.h>
|
||||||
#include <fsfw/power/PowerSwitchIF.h>
|
#include <fsfw/power/PowerSwitchIF.h>
|
||||||
|
|
||||||
DualLanePowerStateMachine::DualLanePowerStateMachine(pcduSwitches::Switches switchA,
|
DualLanePowerStateMachine::DualLanePowerStateMachine(power::Switch_t switchA,
|
||||||
pcduSwitches::Switches switchB,
|
power::Switch_t switchB,
|
||||||
PowerSwitchIF* pwrSwitcher,
|
PowerSwitchIF* pwrSwitcher,
|
||||||
dur_millis_t checkTimeout)
|
dur_millis_t checkTimeout)
|
||||||
: PowerStateMachineBase(pwrSwitcher, checkTimeout), SWITCH_A(switchA), SWITCH_B(switchB) {}
|
: PowerStateMachineBase(pwrSwitcher, checkTimeout), SWITCH_A(switchA), SWITCH_B(switchB) {}
|
||||||
|
@ -12,12 +12,12 @@ class PowerSwitchIF;
|
|||||||
|
|
||||||
class DualLanePowerStateMachine : public PowerStateMachineBase {
|
class DualLanePowerStateMachine : public PowerStateMachineBase {
|
||||||
public:
|
public:
|
||||||
DualLanePowerStateMachine(pcduSwitches::Switches switchA, pcduSwitches::Switches switchB,
|
DualLanePowerStateMachine(power::Switch_t switchA, power::Switch_t switchB,
|
||||||
PowerSwitchIF* pwrSwitcher, dur_millis_t checkTimeout = 5000);
|
PowerSwitchIF* pwrSwitcher, dur_millis_t checkTimeout = 5000);
|
||||||
power::OpCodes fsm() override;
|
power::OpCodes fsm() override;
|
||||||
|
|
||||||
const pcduSwitches::Switches SWITCH_A;
|
const power::Switch_t SWITCH_A;
|
||||||
const pcduSwitches::Switches SWITCH_B;
|
const power::Switch_t SWITCH_B;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user