It's smooth now!
This commit is contained in:
parent
03d1f8313c
commit
3c966dc69f
@ -73,8 +73,8 @@ class Oled(Extension):
|
||||
device_address=0x3C,
|
||||
brightness=0.8,
|
||||
brightness_step=0.1,
|
||||
dim_time=30,
|
||||
off_time=60,
|
||||
dim_time=3,
|
||||
off_time=6,
|
||||
):
|
||||
displayio.release_displays()
|
||||
self.rotation = 180 if flip else 0
|
||||
@ -101,9 +101,9 @@ class Oled(Extension):
|
||||
|
||||
def render_oled(self, layer, *args, **kwargs):
|
||||
splash = displayio.Group()
|
||||
splash.hidden = False if not self._dark else True
|
||||
|
||||
for view in self._views:
|
||||
if self._dark is False:
|
||||
if view[3] == layer or view[3] is None:
|
||||
if view[4] == OledEntryType.TXT:
|
||||
splash.append(
|
||||
@ -159,10 +159,8 @@ class Oled(Extension):
|
||||
|
||||
def before_matrix_scan(self, sandbox):
|
||||
self.dim()
|
||||
if self._dark != self._go_dark:
|
||||
if self._dark != self._go_dark or sandbox.active_layers[0] != self._prevLayers:
|
||||
self._dark = self._go_dark
|
||||
self.updateOLED(sandbox)
|
||||
elif sandbox.active_layers[0] != self._prevLayers:
|
||||
self._prevLayers = sandbox.active_layers[0]
|
||||
self.updateOLED(sandbox)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user