From fd3313fc628b4129814152e04dab946faf616b8b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Apr 2022 18:55:07 +0200 Subject: [PATCH] assign power switcher for imtq and star tracker --- bsp_q7s/core/ObjectFactory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 */