tasks: rendering: commit surfaces before drawing

This commit is contained in:
2026-01-05 13:00:18 +01:00
parent 6132efb7c4
commit 36daf8d6ee
2 changed files with 3 additions and 0 deletions

View File

@@ -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();

View File

@@ -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);