Merge pull request 'Adaption for EM: Add P60 dock without ACU' (#620) from adaption_em_p60_dock_without_acu into main
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
Reviewed-on: #620 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
commit
4074e08480
@ -18,6 +18,8 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
## Changed
|
||||
|
||||
- Adapt EM configuration to include all GomSpace PCDU devices except the ACU. For the ACU
|
||||
(which broke), a dummy will still be used.
|
||||
- Event Manager queue depth is configurable now.
|
||||
- Do not construct and schedule broken TMP1075 device anymore.
|
||||
|
||||
|
@ -146,8 +146,11 @@ set(OBSW_ADD_TMP_DEVICES
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add TMP devices")
|
||||
set(OBSW_ADD_GOMSPACE_PCDU
|
||||
${INIT_VAL}
|
||||
1
|
||||
CACHE STRING "Add GomSpace PCDU modules")
|
||||
set(OBSW_ADD_GOMSPACE_ACU
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add GomSpace ACU submodule")
|
||||
set(OBSW_ADD_RW
|
||||
${INIT_VAL}
|
||||
CACHE STRING "Add RW modules")
|
||||
|
@ -22,6 +22,9 @@
|
||||
#define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1
|
||||
|
||||
#define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@
|
||||
// This define is necessary because the EM setup has the P60 dock module, but no ACU on the P60
|
||||
// module because it broke.
|
||||
#define OBSW_ADD_GOMSPACE_ACU @OBSW_ADD_GOMSPACE_ACU@
|
||||
#define OBSW_ADD_MGT @OBSW_ADD_MGT@
|
||||
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
|
||||
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
|
||||
|
@ -189,7 +189,6 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF,
|
||||
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
||||
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
||||
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, **gpioComIF);
|
||||
//*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, **gpioComIF);
|
||||
}
|
||||
|
||||
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher,
|
||||
@ -197,7 +196,6 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_SIZE, addresses::P60DOCK, 500);
|
||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500);
|
||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU2, 500);
|
||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500);
|
||||
|
||||
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
|
||||
P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF,
|
||||
@ -211,9 +209,12 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
Pdu2Handler* pdu2handler = new Pdu2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
|
||||
pdu2CspCookie, pdu2Fdir, enableHkSets);
|
||||
|
||||
#if OBSW_ADD_GOMSPACE_ACU == 1
|
||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500);
|
||||
auto acuFdir = new GomspacePowerFdir(objects::ACU_HANDLER);
|
||||
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie,
|
||||
acuFdir, enableHkSets);
|
||||
#endif
|
||||
auto pcduHandler = new PcduHandler(objects::PCDU_HANDLER, 50);
|
||||
|
||||
/**
|
||||
@ -223,7 +224,9 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
||||
p60dockhandler->setModeNormal();
|
||||
pdu1handler->setModeNormal();
|
||||
pdu2handler->setModeNormal();
|
||||
#if OBSW_ADD_GOMSPACE_ACU == 1
|
||||
acuhandler->setModeNormal();
|
||||
#endif
|
||||
if (pwrSwitcher != nullptr) {
|
||||
*pwrSwitcher = pcduHandler;
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif
|
||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||
dummyCfg.addPowerDummies = false;
|
||||
// The ACU broke.
|
||||
dummyCfg.addOnlyAcuDummy = true;
|
||||
#endif
|
||||
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||
dummyCfg.addBpxBattDummy = false;
|
||||
@ -93,7 +95,7 @@ void ObjectFactory::produce(void* args) {
|
||||
// createRadSensorComponent(gpioComIF);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher);
|
||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true);
|
||||
#else
|
||||
// Still add all GPIOs for EM.
|
||||
GpioCookie* acsBoardGpios = new GpioCookie();
|
||||
|
@ -77,8 +77,9 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
||||
auto* imtqDummy = new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
imtqDummy->enableThermalModule(ThermalStateCfg());
|
||||
imtqDummy->connectModeTreeParent(*imtqAssy);
|
||||
if (cfg.addPowerDummies) {
|
||||
if (cfg.addOnlyAcuDummy) {
|
||||
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
} else if (cfg.addPowerDummies) {
|
||||
new PduDummy(objects::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new PduDummy(objects::PDU2_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new P60DockDummy(objects::P60DOCK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
|
@ -6,8 +6,11 @@ class GpioIF;
|
||||
|
||||
namespace dummy {
|
||||
|
||||
// Default values targeted towards EM.
|
||||
struct DummyCfg {
|
||||
bool addCoreCtrlCfg = true;
|
||||
// Special variant because the ACU broke. Overrides addPowerDummies, only ACU dummy will be added.
|
||||
bool addOnlyAcuDummy = false;
|
||||
bool addPowerDummies = true;
|
||||
bool addBpxBattDummy = true;
|
||||
bool addSyrlinksDummies = true;
|
||||
|
@ -183,11 +183,11 @@ void DualLaneAssemblyBase::handleModeTransitionFailed(ReturnValue_t result) {
|
||||
// transition to dual mode.
|
||||
if (not tryingOtherSide) {
|
||||
triggerEvent(CANT_KEEP_MODE, mode, submode);
|
||||
startTransition(mode, nextSubmode);
|
||||
startTransition(targetMode, nextSubmode);
|
||||
tryingOtherSide = true;
|
||||
} else {
|
||||
triggerEvent(transitionOtherSideFailedEvent, mode, targetSubmode);
|
||||
startTransition(mode, Submodes::DUAL_MODE);
|
||||
triggerEvent(transitionOtherSideFailedEvent, targetMode, targetSubmode);
|
||||
startTransition(targetMode, Submodes::DUAL_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user