@@ -233,45 +233,5 @@ bool WipperSnapper_Component_I2C::deinitI2CDevice(
233
233
*/
234
234
/* ******************************************************************************/
235
235
void WipperSnapper_Component_I2C::update () {
236
- for (int i = 0 ; i < drivers.size (); i++) {
237
- // Empty wippersnapper_i2c_v1_I2CSensorEvent container message
238
- wippersnapper_i2c_v1_I2CSensorEvent sensorEvent =
239
- wippersnapper_i2c_v1_I2CSensorEvent_init_zero;
240
-
241
- // Check if i2c device has a temperature sensor
242
- if (drivers[i]->getTempSensorPeriod () > -1L ) {
243
- long curTime = millis (); // take the current time
244
- if (curTime - drivers[i]->getTempSensorPeriodPrv () >
245
- drivers[i]->getTempSensorPeriod ()) {
246
- // Update temperature sensor and fill field
247
- wippersnapper_i2c_v1_SensorEvent sensorEventMsg =
248
- wippersnapper_i2c_v1_SensorEvent_init_zero;
249
- drivers[i]->updateTempSensor (&sensorEventMsg.event_data .temperature );
250
- WS_DEBUG_PRINT (" Read Temperature Sensor Value: " );
251
- WS_DEBUG_PRINT (sensorEventMsg.event_data .temperature );
252
- WS_DEBUG_PRINTLN (" Degrees C" );
253
- // TODO: Pack into the sensorEvent message
254
- }
255
- }
256
-
257
- // Check if i2c device has a humidity sensor
258
- if (drivers[i]->getHumidSensorPeriod () > -1L ) {
259
- long curTime = millis (); // take the current time
260
- if (curTime - drivers[i]->getHumidSensorPeriodPrv () >
261
- drivers[i]->getHumidSensorPeriod ()) {
262
- // Update temperature sensor and fill field
263
- wippersnapper_i2c_v1_SensorEvent sensorEventMsg =
264
- wippersnapper_i2c_v1_SensorEvent_init_zero;
265
- drivers[i]->updateHumidSensor (
266
- &sensorEventMsg.event_data .relative_humidity );
267
- WS_DEBUG_PRINT (" Read Humidity Sensor Value: " );
268
- WS_DEBUG_PRINT (sensorEventMsg.event_data .temperature );
269
- WS_DEBUG_PRINTLN (" %RH" );
270
- }
271
- }
272
-
273
- // TODO //
274
- // Fill the container I2CSensorEvent -> Signal proto
275
- // Publish proto
276
- }
236
+ // TODO
277
237
}
0 commit comments