Skip to content

Commit bf87b9a

Browse files
authored
Allow for White in set_pixels (#130)
1 parent 10a19ae commit bf87b9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildhat/matrix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ def __init__(self, port):
1818
def set_pixels(self, matrix):
1919
"""Write pixel data to LED matrix
2020
21-
:param pixels: 3x3 list of tuples, with colour (0–9) and brightness (0–10) (see example for more detail)
21+
:param pixels: 3x3 list of tuples, with colour (0–10) and brightness (0–10) (see example for more detail)
2222
"""
2323
for x in range(3):
2424
for y in range(3):
2525
color, brightness = matrix[x][y]
2626
if not (brightness >= 0 and brightness <= 10):
2727
raise MatrixInvalidPixel("Invalid brightness specified")
28-
if not (color >= 0 and color <= 9):
28+
if not (color >= 0 and color <= 10):
2929
raise MatrixInvalidPixel("Invalid pixel specified")
3030
self._matrix = matrix
3131
self._output()

0 commit comments

Comments
 (0)