about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-11-21 21:05:57 -0700
committerIrene Knapp <ireneista@irenes.space>2026-11-21 21:05:57 -0700
commitefa17e7eb566d81ce821bde459e900d7398a9977 (patch)
tree623059a8ef212b9e340737fa492812d0827fdcf5 /src/main.rs
parent62d218ed210a5c5f6686e80edb38fedd0c952de1 (diff)
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
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
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()?;