This commit is contained in:
eraden 2024-09-17 16:41:20 +02:00
parent e174ecdeaf
commit c1144d58a3

View File

@ -121,15 +121,16 @@ fn main() -> ! {
display.clear(TriColor::White); display.clear(TriColor::White);
ctx.button_pressed = kbd.pressed(); ctx.button_pressed = kbd.pressed();
app.update(&ctx, &mut trng); if !ctx.button_pressed.is_none() {
app.draw(&mut display); app.update(&ctx, &mut trng);
app.draw(&mut display);
// TODO: try fast update?
driver.full_update(&display).unwrap();
}
// TODO: try fast update? log::info!("Sleeping for 100ms...");
driver.full_update(&display).unwrap();
log::info!("Sleeping for 5s...");
driver.sleep().unwrap(); driver.sleep().unwrap();
delay.delay(5_000.millis()); delay.delay(100.millis());
} }
} }