diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 9ee96b37..f32eac6d 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -161,6 +161,7 @@ void ObjectFactory::produce(void* args) { I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV); auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie); + imtqHandler->setPowerSwitcher(pwrSwitcher); static_cast(imtqHandler); #if OBSW_DEBUG_IMTQ == 1 imtqHandler->setStartUpImmediately(); @@ -192,8 +193,9 @@ void ObjectFactory::produce(void* args) { UartModes::NON_CANONICAL); starTrackerCookie->setNoFixedSizeReply(); StrHelper* strHelper = new StrHelper(objects::STR_HELPER); - new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie, strHelper, - pcdu::PDU1_CH2_STAR_TRACKER_5V); + auto starTracker = new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, + starTrackerCookie, strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V); + starTracker->setPowerSwitcher(pwrSwitcher); #endif /* OBSW_ADD_STAR_TRACKER == 1 */