Skip to content

Commit 5d92f8f

Browse files
author
caternuson
committed
time to value so no shadow
1 parent c1c02e0 commit 5d92f8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_tsl2561.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def integration_time(self):
123123
return current & 0x03
124124

125125
@integration_time.setter
126-
def integration_time(self, time):
126+
def integration_time(self, value):
127127
"""Set the integration time. 0:13.7ms, 1:101ms, 2:402ms, or 3:manual."""
128-
time &= 0x03
128+
value &= 0x03
129129
current = self._read_register(TSL2561_REGISTER_TIMING)
130130
self.buf[0] = TSL2561_COMMAND_BIT | TSL2561_REGISTER_TIMING
131-
self.buf[1] = (current & 0xfc) | time
131+
self.buf[1] = (current & 0xfc) | value
132132
with self.i2c_device as i2c:
133133
i2c.write(self.buf, end=2)
134134

0 commit comments

Comments
 (0)