We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10a19ae commit bf87b9aCopy full SHA for bf87b9a
buildhat/matrix.py
@@ -18,14 +18,14 @@ def __init__(self, port):
18
def set_pixels(self, matrix):
19
"""Write pixel data to LED matrix
20
21
- :param pixels: 3x3 list of tuples, with colour (0–9) and brightness (0–10) (see example for more detail)
+ :param pixels: 3x3 list of tuples, with colour (0–10) and brightness (0–10) (see example for more detail)
22
"""
23
for x in range(3):
24
for y in range(3):
25
color, brightness = matrix[x][y]
26
if not (brightness >= 0 and brightness <= 10):
27
raise MatrixInvalidPixel("Invalid brightness specified")
28
- if not (color >= 0 and color <= 9):
+ if not (color >= 0 and color <= 10):
29
raise MatrixInvalidPixel("Invalid pixel specified")
30
self._matrix = matrix
31
self._output()
0 commit comments