repo: archive legacy pico dashboard

This commit is contained in:
2026-06-09 00:52:00 -06:00
parent 9cb06b86ff
commit f5e2c5fd24
38 changed files with 107 additions and 20 deletions
@@ -0,0 +1,21 @@
class ScreenManager:
VALID_SCREENS = ("dashboard", "battery", "temps", "power", "system")
def __init__(self):
self.current_screen = "dashboard"
def go_to(self, screen_name):
if screen_name not in self.VALID_SCREENS:
raise ValueError(f"Invalid screen: {screen_name}")
self.current_screen = screen_name
def next_screen(self):
current_index = self.VALID_SCREENS.index(self.current_screen)
next_index = (current_index + 1) % len(self.VALID_SCREENS)
self.current_screen = self.VALID_SCREENS[next_index]
def previous_screen(self):
current_index = self.VALID_SCREENS.index(self.current_screen)
previous_index = (current_index - 1) % len(self.VALID_SCREENS)
self.current_screen = self.VALID_SCREENS[previous_index]