diff --git a/src/main.rs b/src/main.rs index 18e5a79..f17f7fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()); } }