Performance improvements.
This commit is contained in:
parent
5f09ba7c0a
commit
9c85ea9b6b
@ -61,7 +61,6 @@ class Oled(Extension):
|
|||||||
|
|
||||||
def renderOledTextLayer(self, layer):
|
def renderOledTextLayer(self, layer):
|
||||||
splash = displayio.Group()
|
splash = displayio.Group()
|
||||||
self._display.show(splash)
|
|
||||||
splash.append(
|
splash.append(
|
||||||
label.Label(
|
label.Label(
|
||||||
terminalio.FONT,
|
terminalio.FONT,
|
||||||
@ -98,16 +97,17 @@ class Oled(Extension):
|
|||||||
y=25,
|
y=25,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self._display.show(splash)
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
|
||||||
def renderOledImgLayer(self, layer):
|
def renderOledImgLayer(self, layer):
|
||||||
splash = displayio.Group()
|
splash = displayio.Group()
|
||||||
self._display.show(splash)
|
|
||||||
odb = displayio.OnDiskBitmap(
|
odb = displayio.OnDiskBitmap(
|
||||||
'/' + self.returnCurrectRenderText(layer, self._views[0])
|
'/' + self.returnCurrectRenderText(layer, self._views[0])
|
||||||
)
|
)
|
||||||
image = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
|
image = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
|
||||||
splash.append(image)
|
splash.append(image)
|
||||||
|
self._display.show(splash)
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
|
||||||
def updateOLED(self, sandbox):
|
def updateOLED(self, sandbox):
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import neopixel
|
import neopixel
|
||||||
|
|
||||||
from storage import getmount
|
from storage import getmount
|
||||||
|
|
||||||
from kmk.extensions import Extension
|
from kmk.extensions import Extension
|
||||||
from kmk.handlers.stock import passthrough as handler_passthrough
|
from kmk.handlers.stock import passthrough as handler_passthrough
|
||||||
from kmk.keys import make_key
|
from kmk.keys import make_key
|
||||||
from kmk.utils import clamp
|
|
||||||
|
|
||||||
|
|
||||||
class Color:
|
class Color:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user