Performance improvements.

This commit is contained in:
Jan Lindblom 2022-08-03 23:05:04 +03:00 committed by Kyle Brown
parent 5f09ba7c0a
commit 9c85ea9b6b
2 changed files with 2 additions and 4 deletions

View File

@ -61,7 +61,6 @@ class Oled(Extension):
def renderOledTextLayer(self, layer):
splash = displayio.Group()
self._display.show(splash)
splash.append(
label.Label(
terminalio.FONT,
@ -98,16 +97,17 @@ class Oled(Extension):
y=25,
)
)
self._display.show(splash)
gc.collect()
def renderOledImgLayer(self, layer):
splash = displayio.Group()
self._display.show(splash)
odb = displayio.OnDiskBitmap(
'/' + self.returnCurrectRenderText(layer, self._views[0])
)
image = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
splash.append(image)
self._display.show(splash)
gc.collect()
def updateOLED(self, sandbox):

View File

@ -1,11 +1,9 @@
import neopixel
from storage import getmount
from kmk.extensions import Extension
from kmk.handlers.stock import passthrough as handler_passthrough
from kmk.keys import make_key
from kmk.utils import clamp
class Color: