1
- # The MIT License (MIT)
1
+ # SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries
2
2
#
3
- # Copyright (c) 2017 Tony DiCola for Adafruit Industries
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # SPDX-License-Identifier: MIT
4
+
22
5
"""
23
6
`adafruit_tlc59711`
24
7
====================================================
@@ -213,15 +196,15 @@ def _write(self):
213
196
214
197
def show (self ):
215
198
"""Write out the current LED PWM state to the chip. This is only necessary if
216
- auto_show was set to false in the initializer.
199
+ auto_show was set to false in the initializer.
217
200
"""
218
201
self ._write ()
219
202
220
203
# Define properties for global brightness control channels.
221
204
@property
222
205
def red_brightness (self ):
223
206
"""The red brightness for all channels (i.e. R0, R1, R2, and R3). This is a 7-bit
224
- value from 0-127.
207
+ value from 0-127.
225
208
"""
226
209
return self ._bcr
227
210
@@ -235,7 +218,7 @@ def red_brightness(self, val):
235
218
@property
236
219
def green_brightness (self ):
237
220
"""The green brightness for all channels (i.e. G0, G1, G2, and G3). This is a
238
- 7-bit value from 0-127.
221
+ 7-bit value from 0-127.
239
222
"""
240
223
return self ._bcg
241
224
@@ -249,7 +232,7 @@ def green_brightness(self, val):
249
232
@property
250
233
def blue_brightness (self ):
251
234
"""The blue brightness for all channels (i.e. B0, B1, B2, and B3). This is a 7-bit
252
- value from 0-127.
235
+ value from 0-127.
253
236
"""
254
237
return self ._bcb
255
238
@@ -270,7 +253,7 @@ def __getitem__(self, key):
270
253
# pylint: disable=no-else-return
271
254
# Disable should be removed when refactor can be tested
272
255
"""Retrieve the R, G, B values for the provided channel as a
273
- 3-tuple. Each value is a 16-bit number from 0-65535.
256
+ 3-tuple. Each value is a 16-bit number from 0-65535.
274
257
"""
275
258
if key == 0 :
276
259
return (self .r0 , self .g0 , self .b0 )
@@ -285,7 +268,7 @@ def __getitem__(self, key):
285
268
286
269
def __setitem__ (self , key , val ):
287
270
"""Set the R, G, B values for the provided channel. Specify a
288
- 3-tuple of R, G, B values that are each 16-bit numbers (0-65535).
271
+ 3-tuple of R, G, B values that are each 16-bit numbers (0-65535).
289
272
"""
290
273
assert 0 <= key <= 3 # Do this check here instead of later to
291
274
# prevent accidentally keeping auto_show
0 commit comments