Skip to content
Snippets Groups Projects
Commit 565f7022 authored by dos's avatar dos Committed by dos
Browse files

py,st3m: Move menu LED pattern setting back later in the boot process

Since !620 it happened much earlier, causing a lot of flickering at boot,
especially with plenty of apps installed. Move it back to until after
the application bundles are already collected.

Note that it happens a bit later than before now, as bundle processing
itself happens later because of being moved into the menu class, but
the end result is arguably nicer than before, as there's no weird
delay between setting the LEDs and showing the menu anymore.

Fixes: 06983264 ("Split sunmenu into its own file")
parent f280186c
Branches
Tags
1 merge request!622py,st3m: Split SunMenu and MainMenu; LED fix
Pipeline #12548 passed
......@@ -134,3 +134,10 @@ class MainMenu(SunMenu):
self._items = categories
# # self._scroll_controller = ScrollController()
# self._scroll_controller.set_item_count(len(categories))
def on_enter(self, vm):
super().on_enter(vm)
if self.vm.direction == ViewTransitionDirection.FORWARD:
led_patterns.set_menu_colors()
leds.set_slew_rate(20)
leds.update()
......@@ -9,7 +9,6 @@ from st3m.application import (
setup_for_app,
)
from st3m import settings_menu as settings, logging, processors, wifi
from st3m.ui import led_patterns
import st3m.wifi
import st3m.utils
......@@ -171,10 +170,6 @@ def run_main() -> None:
leds.set_rgb(0, 255, 0, 0)
leds.update()
led_patterns.set_menu_colors()
leds.set_slew_rate(20)
leds.update()
try:
network.hostname(
settings.str_hostname.value if settings.str_hostname.value else "flow3r"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment