Skip to content

Commit aa8bbda

Browse files
committed
dont use rotation offset, change default rotation to 90
1 parent 7036bb7 commit aa8bbda

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

adafruit_displayio_sh1107.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
b"\xaf\x00" # DISPLAY_ON
123123
)
124124
_PIXELS_IN_ROW = True
125-
_ROTATION_OFFSET = 0
126125
else:
127126
_INIT_SEQUENCE = (
128127
b"\xae\x00" # display off, sleep mode
@@ -142,7 +141,6 @@
142141
b"\xaf\x00" # DISPLAY_ON
143142
)
144143
_PIXELS_IN_ROW = False
145-
_ROTATION_OFFSET = 90
146144

147145

148146
class SH1107(Display):
@@ -163,10 +161,9 @@ def __init__(
163161
self,
164162
bus: Union[I2CDisplayBus, FourWire],
165163
display_offset: int = DISPLAY_OFFSET_ADAFRUIT_FEATHERWING_OLED_4650,
166-
rotation: int = 0,
164+
rotation: int = 90,
167165
**kwargs
168166
) -> None:
169-
rotation = (rotation + _ROTATION_OFFSET) % 360
170167
if rotation in (0, 180):
171168
multiplex = kwargs["width"] - 1
172169
else:

0 commit comments

Comments
 (0)