Skip to content
Snippets Groups Projects
Commit 65e9cd10 authored by pippin's avatar pippin
Browse files

st3m: add a run_app utility

parent dea000bd
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,12 @@ from st3m.ui.menu import ( ...@@ -11,7 +11,12 @@ from st3m.ui.menu import (
from st3m.ui.elements import overlays from st3m.ui.elements import overlays
from st3m.ui.view import View, ViewManager, ViewTransitionBlend from st3m.ui.view import View, ViewManager, ViewTransitionBlend
from st3m.ui.elements.menus import SimpleMenu, SunMenu from st3m.ui.elements.menus import SimpleMenu, SunMenu
from st3m.application import BundleManager, BundleMetadata, MenuItemAppLaunch from st3m.application import (
BundleManager,
BundleMetadata,
MenuItemAppLaunch,
ApplicationContext,
)
from st3m.about import About from st3m.about import About
from st3m import settings, logging, processors, wifi from st3m import settings, logging, processors, wifi
...@@ -125,6 +130,10 @@ def run_view(v: View) -> None: ...@@ -125,6 +130,10 @@ def run_view(v: View) -> None:
reactor.run() reactor.run()
def run_app(klass):
run_view(klass(ApplicationContext()))
def _yeet_local_changes() -> None: def _yeet_local_changes() -> None:
os.remove("/flash/sys/.sys-installed") os.remove("/flash/sys/.sys-installed")
machine.reset() machine.reset()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment