We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44157b8 commit 22ad5f9Copy full SHA for 22ad5f9
adafruit_trellism4.py
@@ -68,7 +68,7 @@ def __init__(self, pin, *, width, height, rotation=0):
68
def __setitem__(self, index, value):
69
if not isinstance(index, tuple) or len(index) != 2:
70
raise IndexError("Index must be tuple")
71
- if index[0] > 7 or index[1] > 7:
+ if index[0] >= self.width or index[1] >= self.height:
72
raise IndexError("Pixel assignment outside available coordinates.")
73
74
if self._rotation == 0 or self._rotation == 180:
0 commit comments