From 36daf8d6eefb5932a6fea7df0b8671d3e2389946 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Mon, 5 Jan 2026 13:00:18 +0100 Subject: [PATCH] tasks: rendering: commit surfaces before drawing --- src/tasks/oled_render.rs | 1 + src/tasks/render.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/tasks/oled_render.rs b/src/tasks/oled_render.rs index 041b60d..df7aa25 100644 --- a/src/tasks/oled_render.rs +++ b/src/tasks/oled_render.rs @@ -22,6 +22,7 @@ pub async fn oled_render(mut output: SsdOutput, surfaces: OledUiSurfacePool, uni loop { let start = Instant::now(); + surfaces.commit(); { let mut locked = uniforms.lock().await; output.clear(BinaryColor::Off).unwrap(); diff --git a/src/tasks/render.rs b/src/tasks/render.rs index f09d5fa..57cfb26 100644 --- a/src/tasks/render.rs +++ b/src/tasks/render.rs @@ -56,6 +56,8 @@ pub async fn render(rmt: esp_hal::peripherals::RMT<'static>, gpio: AnyPin<'stati output.blank(); uniforms.frame = (Instant::now().as_millis() / ANIMATION_FRAME_TIME.as_millis()) as usize; + surfaces.commit(); + safety_surfaces.commit(); surfaces.render_to(&mut output, &uniforms); // TODO: We should split up the safety layers so they always have full power safety_surfaces.render_to(&mut output, &uniforms);