Skip to content

Commit 584a24f

Browse files
committed
Switch to using the integration time defines
1 parent 22fe497 commit 584a24f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_tsl2591.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def lux(self):
254254
# Compute the atime in milliseconds
255255
atime = 100.0 * self._integration_time + 100.0
256256

257-
# Set the maximum sensor counts based on the atime setting
258-
if atime == 100:
257+
# Set the maximum sensor counts based on the integration time (atime) setting
258+
if self._integration_time == INTEGRATIONTIME_100MS:
259259
max_counts = _TSL2591_MAX_COUNT_100MS
260260
else:
261261
max_counts = _TSL2591_MAX_COUNT

0 commit comments

Comments
 (0)