From dd909a7f4ae155992c5813d1f85e26657246b2c0 Mon Sep 17 00:00:00 2001 From: sawyer bristol Date: Mon, 14 Jul 2025 00:47:44 -0600 Subject: [PATCH] fix text not showing up right away --- src/display.rs | 3 ++- src/main.rs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display.rs b/src/display.rs index cafcc75..7ec99b6 100644 --- a/src/display.rs +++ b/src/display.rs @@ -23,7 +23,6 @@ use st7365p_lcd::{FrameBuffer, ST7365P}; const SCREEN_WIDTH: usize = 320; const SCREEN_HEIGHT: usize = 320; -const REFRESH_INTERVAL_MS: u64 = 20; pub static DISPLAY_SIGNAL: Signal = Signal::new(); @@ -52,6 +51,8 @@ pub async fn display_handler( framebuffer.draw(&mut display).await.unwrap(); display.set_on().await.unwrap(); + DISPLAY_SIGNAL.signal(()); + loop { DISPLAY_SIGNAL.wait().await; diff --git a/src/main.rs b/src/main.rs index 41fee93..684d8d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,7 +73,6 @@ async fn main(_spawner: Spawner) { } DISPLAY_SIGNAL.signal(()); } - Timer::after_millis(10).await; } }, display_handler(spi1, p.PIN_13, p.PIN_14, p.PIN_15),