You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because for any sensor which is creating multiple child ids, only the last one is returned so calling setSamples() will only apply to the last child id (humidity).
When generating multiple child IDs, each child has to be retrieved individually:
int a = nodeManager.registerSensor(SENSOR_DHT22,6);
nodeManager.setSleep(SLEEP,1,MINUTES);
SensorDHT* t = (SensorDHT*)nodeManager.get(a-1);
SensorDHT* h = (SensorDHT*)nodeManager.get(a);
t->setSamples(5);
h->setSamples(5);
The text was updated successfully, but these errors were encountered:
This is because for any sensor which is creating multiple child ids, only the last one is returned so calling setSamples() will only apply to the last child id (humidity).
When generating multiple child IDs, each child has to be retrieved individually:
The text was updated successfully, but these errors were encountered: