oled data is now a class

This commit is contained in:
Cole Smith
2022-04-17 22:00:59 -07:00
committed by xs5871
parent 7e760a2917
commit 6970a6c786
2 changed files with 48 additions and 20 deletions

View File

@@ -18,6 +18,21 @@ class OledReactionType:
STATIC = 0
LAYER = 1
class OledData:
def __init__(
self,
image=None,
corner_one=None,
corner_two=None,
corner_three=None,
corner_four=None,
):
if image:
self.data=[image]
elif corner_one and corner_two and corner_three and corner_four:
self.data= [corner_one,corner_two,corner_three,corner_four]
class Oled(Extension):
def __init__(
@@ -30,7 +45,7 @@ class Oled(Extension):
):
displayio.release_displays()
self.rotation = 180 if flip else 0
self._views = views
self._views = views.data
self._toDisplay = toDisplay
self._width = oWidth
self._height = oHeight