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);
ctx.button_pressed = kbd.pressed();
app.update(&ctx, &mut trng);
app.draw(&mut display);
if !ctx.button_pressed.is_none() {
app.update(&ctx, &mut trng);
app.draw(&mut display);
// TODO: try fast update?
driver.full_update(&display).unwrap();
}
// TODO: try fast update?
driver.full_update(&display).unwrap();
log::info!("Sleeping for 5s...");
log::info!("Sleeping for 100ms...");
driver.sleep().unwrap();
delay.delay(5_000.millis());
delay.delay(100.millis());
}
}