Skip to content

Commit

Permalink
Merge pull request #39 from dglaude/patch-1
Browse files Browse the repository at this point in the history
Update matrix_11x7.py
  • Loading branch information
makermelissa committed Mar 9, 2021
2 parents a85d015 + e11b25b commit d64cff1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions adafruit_is31fl3731/matrix_11x7.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,4 @@ def __init__(self, i2c, address=0x75):
@staticmethod
def pixel_addr(x, y):
"""Translate an x,y coordinate to a pixel index."""
if x <= 5:
r = x * 16 + y
else:
r = (x - 5) * 16 + y - 8
return r
return (x << 4) - y + (6 if x <= 5 else -82)

0 comments on commit d64cff1

Please sign in to comment.