diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index e5d6abc2..3a1f7ac5 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -85,6 +85,9 @@ void ObjectFactory::produce(void* args) { #if OBSW_ADD_STAR_TRACKER == 1 dummyCfg.addStrDummy = false; #endif +#if OBSW_ADD_SCEX_DEVICE == 0 + dummyCfg.addScexDummy = true; +#endif #if OBSW_ADD_BPX_BATTERY_HANDLER == 1 dummyCfg.addBpxBattDummy = false; #endif diff --git a/dummies/helperFactory.cpp b/dummies/helperFactory.cpp index e085dae0..1612db52 100644 --- a/dummies/helperFactory.cpp +++ b/dummies/helperFactory.cpp @@ -242,8 +242,10 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio power::Switches::PDU2_CH8_PAYLOAD_CAMERA); camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM); } - auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy); - scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM); + if (cfg.addScexDummy) { + auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy); + scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM); + } auto* plPcduDummy = new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); plPcduDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM); diff --git a/dummies/helperFactory.h b/dummies/helperFactory.h index fb272bb8..bd5993c6 100644 --- a/dummies/helperFactory.h +++ b/dummies/helperFactory.h @@ -31,6 +31,7 @@ struct DummyCfg { bool addTmpDummies = true; Tmp1075Cfg tmp1075Cfg; bool addCamSwitcherDummy = false; + bool addScexDummy = false; }; void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF, bool enableHkSets);