change to more generic type
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-03-25 16:01:44 +01:00
parent 74fa98d161
commit f88a063d83
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
5 changed files with 13 additions and 11 deletions

View File

@ -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,

View File

@ -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),

View File

@ -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);

View File

@ -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) {}

View File

@ -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:
}; };