File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -250,18 +250,18 @@ def lux(self):
250
250
and visible light channels.
251
251
"""
252
252
channel_0 , channel_1 = self .raw_luminosity
253
-
253
+
254
254
# Compute the atime in milliseconds
255
255
atime = 100.0 * self ._integration_time + 100.0
256
-
256
+
257
257
# Set the maximum sensor counts based on the atime setting
258
- if 100 == atime :
259
- maxCounts = _TSL2591_MAX_COUNT_100MS
258
+ if atime == 100 :
259
+ max_counts = _TSL2591_MAX_COUNT_100MS
260
260
else :
261
- maxCounts = _TSL2591_MAX_COUNT
262
-
261
+ max_counts = _TSL2591_MAX_COUNT
262
+
263
263
# Handle overflow.
264
- if channel_0 >= maxCounts or channel_1 >= maxCounts :
264
+ if channel_0 >= max_counts or channel_1 >= max_counts :
265
265
raise RuntimeError ('Overflow reading light channels!' )
266
266
# Calculate lux using same equation as Arduino library:
267
267
# https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/Adafruit_TSL2591.cpp
You can’t perform that action at this time.
0 commit comments