From aa7497fa600adcc7b2ea11af43563d24ba5cebd4 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 10 Oct 2018 21:30:22 +0200 Subject: [PATCH] Still trying to fix an error --- examples/embedded_linux_epd4in2/src/main.rs | 2 +- src/epd4in2/mod.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/embedded_linux_epd4in2/src/main.rs b/examples/embedded_linux_epd4in2/src/main.rs index b7b7b2d..25d2489 100644 --- a/examples/embedded_linux_epd4in2/src/main.rs +++ b/examples/embedded_linux_epd4in2/src/main.rs @@ -62,7 +62,7 @@ impl<'a> InputPin for HackInputPin<'a> { * */ fn main() { - run().map_err(|e| println!("{:?}", e.to_string())); + run().map_err(|e| println!("{}", e.to_string())); } diff --git a/src/epd4in2/mod.rs b/src/epd4in2/mod.rs index 9d602b8..640fa6f 100644 --- a/src/epd4in2/mod.rs +++ b/src/epd4in2/mod.rs @@ -97,6 +97,7 @@ where // power on self.command(spi, Command::POWER_ON)?; + delay.delay_ms(5); self.wait_until_idle(); // set the panel settings @@ -192,7 +193,7 @@ where self.command(spi, Command::DATA_START_TRANSMISSION_1)?; - self.send_data(spi, &[color_value; WIDTH as usize / 8 * HEIGHT as usize]); + self.send_data(spi, &[color_value; WIDTH as usize / 8 * HEIGHT as usize])?; //for _ in 0..buffer.len() { // self.send_data(spi, &[color_value])?; //}