@@ -127,31 +127,31 @@ bool WipperSnapper_Component_I2C::attachI2CDevice(
127
127
// AHTX0 Sensor
128
128
if (msgDeviceInitReq->has_aht_init ) {
129
129
// TODO: Implement handling in future release
130
- /* uint16_t addr = (uint16_t)msgDeviceInitReq->aht_init.address;
131
- WS_DEBUG_PRINTLN("Requesting to initialize AHTx sensor");
132
- WS_DEBUG_PRINT("\tSensor Addr: ");
133
- WS_DEBUG_PRINTLN(addr, HEX);
134
- WS_DEBUG_PRINT("\tTemperature sensor enabled? ");
135
- WS_DEBUG_PRINTLN(msgDeviceInitReq->aht_init.enable_temperature);
136
- WS_DEBUG_PRINT("\tHumidity sensor enabled? ");
137
- WS_DEBUG_PRINTLN(msgDeviceInitReq->aht_init.enable_humidity);
130
+ /* uint16_t addr = (uint16_t)msgDeviceInitReq->aht_init.address;
131
+ WS_DEBUG_PRINTLN("Requesting to initialize AHTx sensor");
132
+ WS_DEBUG_PRINT("\tSensor Addr: ");
133
+ WS_DEBUG_PRINTLN(addr, HEX);
134
+ WS_DEBUG_PRINT("\tTemperature sensor enabled? ");
135
+ WS_DEBUG_PRINTLN(msgDeviceInitReq->aht_init.enable_temperature);
136
+ WS_DEBUG_PRINT("\tHumidity sensor enabled? ");
137
+ WS_DEBUG_PRINTLN(msgDeviceInitReq->aht_init.enable_humidity);
138
138
139
- // TODO: Create I2C Driver using the an AHT driver sub-class!
140
- I2C_Driver *aht = new I2C_Driver(addr, this->_i2c);
141
- // Attempt to initialize the sensor driver
142
- if (!aht->initAHTX0()) {
143
- attachSuccess = false;
144
- return attachSuccess;
145
- }
146
- // Initialize device-specific sensors
147
- if (msgDeviceInitReq->aht_init.enable_temperature == true) {
148
- aht->enableAHTX0Temperature();
149
- }
150
- if (msgDeviceInitReq->aht_init.enable_humidity == true) {
151
- aht->enableAHTX0Humidity();
152
- }
153
- // Push to vector for sensor drivers
154
- activeDrivers.push_back(aht); */
139
+ // TODO: Create I2C Driver using the an AHT driver sub-class!
140
+ I2C_Driver *aht = new I2C_Driver(addr, this->_i2c);
141
+ // Attempt to initialize the sensor driver
142
+ if (!aht->initAHTX0()) {
143
+ attachSuccess = false;
144
+ return attachSuccess;
145
+ }
146
+ // Initialize device-specific sensors
147
+ if (msgDeviceInitReq->aht_init.enable_temperature == true) {
148
+ aht->enableAHTX0Temperature();
149
+ }
150
+ if (msgDeviceInitReq->aht_init.enable_humidity == true) {
151
+ aht->enableAHTX0Humidity();
152
+ }
153
+ // Push to vector for sensor drivers
154
+ activeDrivers.push_back(aht); */
155
155
attachSuccess = true ;
156
156
} else {
157
157
WS_DEBUG_PRINTLN (" ERROR: Sensor not found" )
0 commit comments