mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-04 06:16:42 +00:00
reverse color change
This commit is contained in:
@@ -351,7 +351,7 @@ fn run() -> Result<(), std::io::Error> {
|
|||||||
|
|
||||||
epd4in2.update_frame(&mut spi, &display.buffer()).unwrap();
|
epd4in2.update_frame(&mut spi, &display.buffer()).unwrap();
|
||||||
epd4in2.display_frame(&mut spi).expect("display frame new graphics");
|
epd4in2.display_frame(&mut spi).expect("display frame new graphics");
|
||||||
if i >= 20 {
|
if i >= limit {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-4
@@ -98,12 +98,10 @@ impl Drawing<Color> for DisplayEink42BlackWhite {
|
|||||||
|
|
||||||
match color {
|
match color {
|
||||||
Color::Black => {
|
Color::Black => {
|
||||||
//self.buffer[idx] &= !bit;
|
self.buffer[idx] &= !bit;
|
||||||
self.buffer[idx] |= bit;
|
|
||||||
}
|
}
|
||||||
Color::White => {
|
Color::White => {
|
||||||
//self.buffer[idx] |= bit;
|
self.buffer[idx] |= bit;
|
||||||
self.buffer[idx] &= !bit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user