diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index f5397e04..326b4edc 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -129,12 +129,12 @@ void ObjectFactory::createTmpComponents() { new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV); /* Temperature sensors */ - Tmp1075Handler* tmp1075Handler_1 = + Tmp1075Handler* tmp1075Handler1 = new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1); - (void)tmp1075Handler_1; - Tmp1075Handler* tmp1075Handler_2 = + tmp1075Handler1->setModeNormal(); + Tmp1075Handler* tmp1075Handler2 = new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2); - (void)tmp1075Handler_2; + tmp1075Handler2->setModeNormal(); } void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, diff --git a/mission/devices/Tmp1075Handler.cpp b/mission/devices/Tmp1075Handler.cpp index 22d72999..4b7cff57 100644 --- a/mission/devices/Tmp1075Handler.cpp +++ b/mission/devices/Tmp1075Handler.cpp @@ -127,3 +127,7 @@ ReturnValue_t Tmp1075Handler::initializeLocalDataPool(localpool::DataPool &local subdp::RegularHkPeriodicParams(dataset.getSid(), false, 30.0)); return returnvalue::OK; } + +void Tmp1075Handler::setModeNormal() { + setMode(_MODE_TO_NORMAL); +} diff --git a/mission/devices/Tmp1075Handler.h b/mission/devices/Tmp1075Handler.h index 3077cf1a..7d0c0fbf 100644 --- a/mission/devices/Tmp1075Handler.h +++ b/mission/devices/Tmp1075Handler.h @@ -20,6 +20,7 @@ class Tmp1075Handler : public DeviceHandlerBase { Tmp1075Handler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie); virtual ~Tmp1075Handler(); + void setModeNormal(); protected: void doStartUp() override; void doShutDown() override;