add dual lane power switcher for PL PCDU
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
0937697637
commit
74fa98d161
@ -148,7 +148,7 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
createHeaterComponents();
|
||||
createSolarArrayDeploymentComponents();
|
||||
createPlPcduComponents(gpioComIF, spiComIF);
|
||||
createPlPcduComponents(gpioComIF, spiComIF, pwrSwitcher);
|
||||
#if OBSW_ADD_SYRLINKS == 1
|
||||
createSyrlinksComponents();
|
||||
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
||||
@ -1134,7 +1134,8 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
#endif /* BOARD_TE0720 == 0 */
|
||||
}
|
||||
|
||||
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF) {
|
||||
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
PowerSwitchIF* pwrSwitcher) {
|
||||
using namespace gpio;
|
||||
// Create all GPIO components first
|
||||
GpioCookie* plPcduGpios = new GpioCookie;
|
||||
@ -1180,9 +1181,10 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
||||
q7s::SPI_DEFAULT_DEV, plpcdu::MAX_ADC_REPLY_SIZE,
|
||||
spi::DEFAULT_MAX_1227_MODE, spi::PL_PCDU_MAX_1227_SPEED);
|
||||
// Create device handler components
|
||||
auto plPcduHandler =
|
||||
new PayloadPcduHandler(objects::PLPCDU_HANDLER, objects::SPI_COM_IF, spiCookie, gpioComIF,
|
||||
SdCardManager::instance(), false);
|
||||
auto plPcduHandler = new PayloadPcduHandler(
|
||||
objects::PLPCDU_HANDLER, objects::SPI_COM_IF, spiCookie, gpioComIF, SdCardManager::instance(),
|
||||
pwrSwitcher, pcduSwitches::Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
|
||||
pcduSwitches::Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8, false);
|
||||
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
|
||||
static_cast<void>(plPcduHandler);
|
||||
#if OBSW_TEST_PL_PCDU == 1
|
||||
|
@ -15,7 +15,8 @@ void produce(void* args);
|
||||
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
|
||||
SpiComIF** spiComIF, I2cComIF** i2cComIF);
|
||||
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher);
|
||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF);
|
||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
PowerSwitchIF* pwrSwitcher);
|
||||
void createTmpComponents();
|
||||
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
|
||||
void createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
|
@ -14,12 +14,14 @@
|
||||
|
||||
PayloadPcduHandler::PayloadPcduHandler(object_id_t objectId, object_id_t comIF, CookieIF* cookie,
|
||||
GpioIF* gpioIF, SdCardMountedIF* sdcMan,
|
||||
bool periodicPrintout)
|
||||
PowerSwitchIF* pwrSwitcher, pcduSwitches::Switches switchA,
|
||||
pcduSwitches::Switches switchB, bool periodicPrintout)
|
||||
: DeviceHandlerBase(objectId, comIF, cookie),
|
||||
adcSet(this),
|
||||
periodicPrintout(periodicPrintout),
|
||||
gpioIF(gpioIF),
|
||||
sdcMan(sdcMan) {}
|
||||
sdcMan(sdcMan),
|
||||
pwrStateMachine(switchA, switchB, pwrSwitcher) {}
|
||||
|
||||
void PayloadPcduHandler::doStartUp() {
|
||||
if ((state != States::PL_PCDU_OFF) and (state != States::ON_TRANS_SSR)) {
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||
#include <fsfw/timemanager/Countdown.h>
|
||||
#include <mission/system/DualLanePowerStateMachine.h>
|
||||
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "fsfw/FSFW.h"
|
||||
@ -60,7 +61,9 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
||||
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,
|
||||
SdCardMountedIF* sdcMan, bool periodicPrintout);
|
||||
SdCardMountedIF* sdcMan, PowerSwitchIF* pwrSwitcher,
|
||||
pcduSwitches::Switches switchA, pcduSwitches::Switches switchB,
|
||||
bool periodicPrintout);
|
||||
|
||||
void setToGoToNormalModeImmediately(bool enable);
|
||||
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
||||
@ -133,6 +136,7 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
||||
PoolEntry<float> processedValues =
|
||||
PoolEntry<float>({0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
|
||||
PoolEntry<float> tempC = PoolEntry<float>({0.0});
|
||||
DualLanePowerStateMachine pwrStateMachine;
|
||||
|
||||
void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override;
|
||||
void doStartUp() override;
|
||||
|
@ -14,8 +14,7 @@ struct TcsBoardHelper {
|
||||
class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
|
||||
public:
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
|
||||
static constexpr Event CHILDREN_LOST_MODE =
|
||||
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
|
||||
TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
||||
power::Switch_t switcher, TcsBoardHelper helper);
|
||||
|
Loading…
x
Reference in New Issue
Block a user