diff --git a/python_payload/st3m/about.py b/python_payload/st3m/about.py index f1521067984f19d6719b6d6d92eb95d43609b9fa..23c661890278cb5cfaada365ade2a8f15e338d83 100644 --- a/python_payload/st3m/about.py +++ b/python_payload/st3m/about.py @@ -33,6 +33,9 @@ class Screen(Responder): def think(self, ins: InputState, delta_ms: int) -> None: pass + def update(self) -> None: + pass + class HeroScreen(Screen): """ @@ -74,6 +77,9 @@ class SpaceScreen(Screen): """ def __init__(self) -> None: + pass + + def update(self) -> None: flash_statvfs = os.statvfs("/flash") flash_free = flash_statvfs[1] * flash_statvfs[3] flash_total = flash_statvfs[1] * flash_statvfs[2] @@ -203,6 +209,11 @@ class About(BaseView): self.screen_ix_anim = 0.0 super().__init__() + def on_enter(self, vm: Optional["ViewManager"]) -> None: + super().__init__(vm) + for screen in self.screens: + screen.update() + def think(self, ins: InputState, delta_ms: int) -> None: super().think(ins, delta_ms) self.ts += delta_ms / 1000