Skip to content

Commit c1c02e0

Browse files
author
caternuson
committed
added const() to constants
1 parent 0d5d8b6 commit c1c02e0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

adafruit_tsl2561.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
"""
3030
from adafruit_bus_device.i2c_device import I2CDevice
3131

32-
TSL2561_DEFAULT_ADDRESS = 0x39
33-
TSL2561_COMMAND_BIT = 0x80
34-
TSL2561_WORD_BIT = 0x20
35-
36-
TSL2561_CONTROL_POWERON = 0x03
37-
TSL2561_CONTROL_POWEROFF = 0x00
38-
39-
TSL2561_REGISTER_CONTROL = 0x00
40-
TSL2561_REGISTER_TIMING = 0x01
41-
TSL2561_REGISTER_CHAN0_LOW = 0x0C
42-
TSL2561_REGISTER_CHAN1_LOW = 0x0E
43-
TSL2561_REGISTER_ID = 0x0A
32+
TSL2561_DEFAULT_ADDRESS = const(0x39)
33+
TSL2561_COMMAND_BIT = const(0x80)
34+
TSL2561_WORD_BIT = const(0x20)
35+
36+
TSL2561_CONTROL_POWERON = const(0x03)
37+
TSL2561_CONTROL_POWEROFF = const(0x00)
38+
39+
TSL2561_REGISTER_CONTROL = const(0x00)
40+
TSL2561_REGISTER_TIMING = const(0x01)
41+
TSL2561_REGISTER_CHAN0_LOW = const(0x0C)
42+
TSL2561_REGISTER_CHAN1_LOW = const(0x0E)
43+
TSL2561_REGISTER_ID = const(0x0A)
4444

4545
TSL2561_GAIN_SCALE = (16, 1)
4646
TSL2561_TIME_SCALE = (1 / 0.034, 1 / 0.252, 1)

0 commit comments

Comments
 (0)