WIP: Rework config of GYRs #613
@ -18,6 +18,8 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
## Changed
|
## 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.
|
- Event Manager queue depth is configurable now.
|
||||||
- Do not construct and schedule broken TMP1075 device anymore.
|
- Do not construct and schedule broken TMP1075 device anymore.
|
||||||
- Do not track payload modes in system mode tables.
|
- Do not track payload modes in system mode tables.
|
||||||
|
@ -146,8 +146,11 @@ set(OBSW_ADD_TMP_DEVICES
|
|||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add TMP devices")
|
CACHE STRING "Add TMP devices")
|
||||||
set(OBSW_ADD_GOMSPACE_PCDU
|
set(OBSW_ADD_GOMSPACE_PCDU
|
||||||
${INIT_VAL}
|
1
|
||||||
CACHE STRING "Add GomSpace PCDU modules")
|
CACHE STRING "Add GomSpace PCDU modules")
|
||||||
|
set(OBSW_ADD_GOMSPACE_ACU
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add GomSpace ACU submodule")
|
||||||
set(OBSW_ADD_RW
|
set(OBSW_ADD_RW
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add RW modules")
|
CACHE STRING "Add RW modules")
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1
|
#define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1
|
||||||
|
|
||||||
#define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@
|
#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_MGT @OBSW_ADD_MGT@
|
||||||
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
|
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
|
||||||
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
|
#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);
|
*i2cComIF = new I2cComIF(objects::I2C_COM_IF);
|
||||||
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
*uartComIF = new SerialComIF(objects::UART_COM_IF);
|
||||||
*spiMainComIF = new SpiComIF(objects::SPI_MAIN_COM_IF, q7s::SPI_DEFAULT_DEV, **gpioComIF);
|
*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,
|
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* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_SIZE, addresses::P60DOCK, 500);
|
||||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500);
|
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500);
|
||||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU2, 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);
|
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
|
||||||
P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF,
|
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,
|
Pdu2Handler* pdu2handler = new Pdu2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
|
||||||
pdu2CspCookie, pdu2Fdir, enableHkSets);
|
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);
|
auto acuFdir = new GomspacePowerFdir(objects::ACU_HANDLER);
|
||||||
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie,
|
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie,
|
||||||
acuFdir, enableHkSets);
|
acuFdir, enableHkSets);
|
||||||
|
#endif
|
||||||
auto pcduHandler = new PcduHandler(objects::PCDU_HANDLER, 50);
|
auto pcduHandler = new PcduHandler(objects::PCDU_HANDLER, 50);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -223,7 +224,9 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchI
|
|||||||
p60dockhandler->setModeNormal();
|
p60dockhandler->setModeNormal();
|
||||||
pdu1handler->setModeNormal();
|
pdu1handler->setModeNormal();
|
||||||
pdu2handler->setModeNormal();
|
pdu2handler->setModeNormal();
|
||||||
|
#if OBSW_ADD_GOMSPACE_ACU == 1
|
||||||
acuhandler->setModeNormal();
|
acuhandler->setModeNormal();
|
||||||
|
#endif
|
||||||
if (pwrSwitcher != nullptr) {
|
if (pwrSwitcher != nullptr) {
|
||||||
*pwrSwitcher = pcduHandler;
|
*pwrSwitcher = pcduHandler;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
dummyCfg.addPowerDummies = false;
|
dummyCfg.addPowerDummies = false;
|
||||||
|
// The ACU broke.
|
||||||
|
dummyCfg.addOnlyAcuDummy = true;
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||||
dummyCfg.addBpxBattDummy = false;
|
dummyCfg.addBpxBattDummy = false;
|
||||||
@ -93,7 +95,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
// createRadSensorComponent(gpioComIF);
|
// createRadSensorComponent(gpioComIF);
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher);
|
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true);
|
||||||
#else
|
#else
|
||||||
// Still add all GPIOs for EM.
|
// Still add all GPIOs for EM.
|
||||||
GpioCookie* acsBoardGpios = new GpioCookie();
|
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);
|
auto* imtqDummy = new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
imtqDummy->enableThermalModule(ThermalStateCfg());
|
imtqDummy->enableThermalModule(ThermalStateCfg());
|
||||||
imtqDummy->connectModeTreeParent(*imtqAssy);
|
imtqDummy->connectModeTreeParent(*imtqAssy);
|
||||||
if (cfg.addPowerDummies) {
|
if (cfg.addOnlyAcuDummy) {
|
||||||
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
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::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
new PduDummy(objects::PDU2_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);
|
new P60DockDummy(objects::P60DOCK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
@ -6,8 +6,11 @@ class GpioIF;
|
|||||||
|
|
||||||
namespace dummy {
|
namespace dummy {
|
||||||
|
|
||||||
|
// Default values targeted towards EM.
|
||||||
struct DummyCfg {
|
struct DummyCfg {
|
||||||
bool addCoreCtrlCfg = true;
|
bool addCoreCtrlCfg = true;
|
||||||
|
// Special variant because the ACU broke. Overrides addPowerDummies, only ACU dummy will be added.
|
||||||
|
bool addOnlyAcuDummy = false;
|
||||||
bool addPowerDummies = true;
|
bool addPowerDummies = true;
|
||||||
bool addBpxBattDummy = true;
|
bool addBpxBattDummy = true;
|
||||||
bool addSyrlinksDummies = true;
|
bool addSyrlinksDummies = true;
|
||||||
|
@ -183,11 +183,11 @@ void DualLaneAssemblyBase::handleModeTransitionFailed(ReturnValue_t result) {
|
|||||||
// transition to dual mode.
|
// transition to dual mode.
|
||||||
if (not tryingOtherSide) {
|
if (not tryingOtherSide) {
|
||||||
triggerEvent(CANT_KEEP_MODE, mode, submode);
|
triggerEvent(CANT_KEEP_MODE, mode, submode);
|
||||||
startTransition(mode, nextSubmode);
|
startTransition(targetMode, nextSubmode);
|
||||||
tryingOtherSide = true;
|
tryingOtherSide = true;
|
||||||
} else {
|
} else {
|
||||||
triggerEvent(transitionOtherSideFailedEvent, mode, targetSubmode);
|
triggerEvent(transitionOtherSideFailedEvent, targetMode, targetSubmode);
|
||||||
startTransition(mode, Submodes::DUAL_MODE);
|
startTransition(targetMode, Submodes::DUAL_MODE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user