added second tmp1075
This commit is contained in:
parent
249f5c4e73
commit
656f80e419
@ -57,6 +57,8 @@ void ObjectFactory::produce(){
|
||||
addresses::ACU);
|
||||
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
|
||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
||||
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
|
||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
||||
|
||||
/* Communication interfaces */
|
||||
new CspComIF(objects::CSP_COM_IF);
|
||||
@ -79,6 +81,10 @@ void ObjectFactory::produce(){
|
||||
objects::TMP1075_HANDLER_1, objects::I2C_COM_IF,
|
||||
i2cCookieTmp1075tcs1);
|
||||
tmp1075Handler_1->setStartUpImmediately();
|
||||
Tmp1075Handler* tmp1075Handler_2 = new Tmp1075Handler(
|
||||
objects::TMP1075_HANDLER_2, objects::I2C_COM_IF,
|
||||
i2cCookieTmp1075tcs2);
|
||||
tmp1075Handler_2->setStartUpImmediately();
|
||||
|
||||
|
||||
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
||||
|
@ -12,14 +12,24 @@ ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1,
|
||||
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2,
|
||||
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1,
|
||||
length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2,
|
||||
length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1,
|
||||
length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2,
|
||||
length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1,
|
||||
length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2,
|
||||
length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1,
|
||||
length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2,
|
||||
length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
|
@ -99,7 +99,9 @@ ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
tempValueRaw = packet[0] << 4 | packet[1] >> 4;
|
||||
float tempValue = ((static_cast<float>(tempValueRaw)) * 0.0625);
|
||||
#if OBSW_ENHANCED_PRINTOUT == 1
|
||||
sif::info << "Tmp1075: Temperature: " << tempValue<< " °C" << std::endl;
|
||||
sif::info << "Tmp1075 with object id: 0x" << std::hex << getObjectId()
|
||||
<< ": Temperature: " << tempValue<< " °C"
|
||||
<< std::endl;
|
||||
#endif
|
||||
ReturnValue_t result = dataset.read();
|
||||
if(result == HasReturnvaluesIF::RETURN_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user