graphics: rewrite the DisplayControls to use a write-ack mechanism between the renderer and ui tasks

This commit is contained in:
2026-03-27 22:38:49 +01:00
parent 3fff4fdfd1
commit 8ff29caa6f
7 changed files with 85 additions and 66 deletions

View File

@@ -82,8 +82,10 @@ async fn main(spawner: Spawner) {
let mut surfaces = UiSurfacePool::default();
let ui = Ui::new(&mut surfaces);
let display_controls = DisplayControls::default();
let oled_controls = DisplayControls::default();
static MAIN_DISPLAY_SWITCH: ConstStaticCell<DisplayControlResources> = ConstStaticCell::new(DisplayControlResources::new());
static OLED_DISPLAY_SWITCH: ConstStaticCell<DisplayControlResources> = ConstStaticCell::new(DisplayControlResources::new());
let display_controls = DisplayControls::new(MAIN_DISPLAY_SWITCH.take());
let oled_controls = DisplayControls::new(OLED_DISPLAY_SWITCH.take());
let mut oled_surfaces = OledUiSurfacePool::default();
let oled_uniforms = Default::default();