Skip to content

Commit 77ff0ed

Browse files
committed
Added rotation parameter
1 parent 9d9545d commit 77ff0ed

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

adafruit_matrixportal/matrix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def __init__(
6565
alt_addr_pins=None,
6666
color_order="RGB",
6767
serpentine=True,
68-
tile_rows=1
68+
tile_rows=1,
69+
rotation=0,
6970
):
7071

7172
panel_height = height // tile_rows
@@ -177,7 +178,7 @@ def __init__(
177178
latch_pin=latch_pin,
178179
output_enable_pin=oe_pin,
179180
)
180-
self.display = framebufferio.FramebufferDisplay(matrix)
181+
self.display = framebufferio.FramebufferDisplay(matrix, rotation=rotation)
181182
except TypeError:
182183
if tile_rows > 1:
183184
raise RuntimeError(

adafruit_matrixportal/matrixportal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def __init__(
9191
height=32,
9292
serpentine=True,
9393
tile_rows=1,
94+
rotation=0,
9495
):
9596

9697
graphics = Graphics(
@@ -102,6 +103,7 @@ def __init__(
102103
color_order=color_order,
103104
serpentine=serpentine,
104105
tile_rows=tile_rows,
106+
rotation=rotation,
105107
debug=debug,
106108
)
107109

0 commit comments

Comments
 (0)