@@ -198,6 +198,13 @@ T1000xSensor t1000xSensor;
198
198
IndicatorSensor indicatorSensor;
199
199
#endif
200
200
201
+ #if __has_include(<Adafruit_TSL2561_U.h>)
202
+ #include " Sensor/TSL2561Sensor.h"
203
+ TSL2561Sensor tsl2561Sensor;
204
+ #else
205
+ NullSensor tsl2561Sensor;
206
+ #endif
207
+
201
208
#define FAILED_STATE_SENSOR_READ_MULTIPLIER 10
202
209
#define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true
203
210
@@ -296,6 +303,8 @@ int32_t EnvironmentTelemetryModule::runOnce()
296
303
result = max17048Sensor.runOnce ();
297
304
if (cgRadSens.hasSensor ())
298
305
result = cgRadSens.runOnce ();
306
+ if (tsl2561Sensor.hasSensor ())
307
+ result = tsl2561Sensor.runOnce ();
299
308
if (pct2075Sensor.hasSensor ())
300
309
result = pct2075Sensor.runOnce ();
301
310
// this only works on the wismesh hub with the solar option. This is not an I2C sensor, so we don't need the
@@ -642,6 +651,10 @@ bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m
642
651
valid = valid && nau7802Sensor.getMetrics (m);
643
652
hasSensor = true ;
644
653
}
654
+ if (tsl2561Sensor.hasSensor ()) {
655
+ valid = valid && tsl2561Sensor.getMetrics (m);
656
+ hasSensor = true ;
657
+ }
645
658
if (aht10Sensor.hasSensor ()) {
646
659
if (!bmp280Sensor.hasSensor () && !bmp3xxSensor.hasSensor ()) {
647
660
valid = valid && aht10Sensor.getMetrics (m);
0 commit comments