make the quick example faster
parent
ea1843f506
commit
bfafb8b058
|
|
@ -169,11 +169,12 @@ fn run() -> Result<(), std::io::Error> {
|
||||||
epd.display_frame(&mut spi).expect("display frame new graphics");
|
epd.display_frame(&mut spi).expect("display frame new graphics");
|
||||||
delay.delay_ms(5000u16);
|
delay.delay_ms(5000u16);
|
||||||
|
|
||||||
// a moving `Hello World!`
|
// a quickly moving `Hello World!`
|
||||||
|
display.set_rotation(DisplayRotation::Rotate0);
|
||||||
epd.set_lut_quick(&mut spi).expect("SET LUT QUICK error");
|
epd.set_lut_quick(&mut spi).expect("SET LUT QUICK error");
|
||||||
let limit = 20;
|
let limit = 20;
|
||||||
for i in 0..limit {
|
for i in 0..limit {
|
||||||
println!("Moving Hello World. Loop {} from {}", i, limit);
|
println!("Moving Hello World. Loop {} from {}", (i+1), limit);
|
||||||
|
|
||||||
display.draw(
|
display.draw(
|
||||||
Font6x8::render_str(" Hello World! ")
|
Font6x8::render_str(" Hello World! ")
|
||||||
|
|
@ -188,8 +189,6 @@ fn run() -> Result<(), std::io::Error> {
|
||||||
|
|
||||||
epd.update_frame(&mut spi, &display.buffer()).unwrap();
|
epd.update_frame(&mut spi, &display.buffer()).unwrap();
|
||||||
epd.display_frame(&mut spi).expect("display frame new graphics");
|
epd.display_frame(&mut spi).expect("display frame new graphics");
|
||||||
|
|
||||||
delay.delay_ms(1_000u16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the EPD to sleep
|
// Set the EPD to sleep
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue