From efa17e7eb566d81ce821bde459e900d7398a9977 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 21 Nov 2026 21:05:57 -0700 Subject: facilities now get an update ping at the start of each frame with that done, battery status now updates live! wooooo Force-Push: yes Change-Id: If7f2343f6d7762e8f65a4735deadc1b871e26f9d --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index d7710c7..fa97c35 100644 --- a/src/main.rs +++ b/src/main.rs @@ -344,6 +344,15 @@ impl Dock { { let mut facilities = self.facilities.lock()?; + /* Before we handle any modules, we update all the facilities. This is + * the easy way to make sure each facility gets updated exactly once per + * frame; making it the modules' responsibility would be more + * bookkeeping, to no purpose. + */ + for facility in facilities.iter_mut() { + facility.update()?; + } + for (module, framing) in &self.modules { let text = { let mut module = module.lock()?; -- cgit 1.4.1