created i2c com if fpr tmp1075 handler

This commit is contained in:
Jakob Meier 2022-03-27 12:32:05 +02:00
parent 1dfc18ae66
commit ad9f40d70a

View File

@ -1,8 +1,9 @@
#include "ObjectFactory.h"
#include <devConf.h>
#include <fsfw_hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include "OBSWConfig.h"
#include "busConf.h"
@ -134,16 +135,14 @@ void ObjectFactory::produce(void* args) {
plocSupervisor->setStartUpImmediately();
#endif
new I2cComIF(objects::I2C_COM_IF);
I2cCookie* i2cCookieTmp1075tcs1 =
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs2 =
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
/* Temperature sensors */
Tmp1075Handler* tmp1075Handler_1 =
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
(void)tmp1075Handler_1;
Tmp1075Handler* tmp1075Handler_2 =
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
(void)tmp1075Handler_2;
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
}