for further testing purposes, draw_byte is still not stable

embedded-hal-1.0
Chris 2018-05-28 00:18:38 +02:00
parent 38a400a83f
commit 869866d997
2 changed files with 4 additions and 2 deletions

View File

@ -150,6 +150,8 @@ fn main() {
epd4in2.delay_ms(3000); epd4in2.delay_ms(3000);
//pub fn draw_string(&self, buffer: &mut[u8], x0: u16, y0: u16, input: String, color: &Color) { //pub fn draw_string(&self, buffer: &mut[u8], x0: u16, y0: u16, input: String, color: &Color) {
graphics.draw_string(&mut buffer, 16, 16, &['h', 'e', 'l', 'l', 'o'], &Color::Black); graphics.draw_string(&mut buffer, 16, 16, &['h', 'e', 'l', 'l', 'o'], &Color::Black);
graphics.draw_char(&mut buffer, 250, 250, '#', &Color::Black);
graphics.draw_char(&mut buffer, 300, 16, '7', &Color::Black);
epd4in2.display_and_transfer_frame(&buffer, None).expect("display and transfer error"); epd4in2.display_and_transfer_frame(&buffer, None).expect("display and transfer error");
epd4in2.delay_ms(3000); epd4in2.delay_ms(3000);

View File

@ -132,10 +132,10 @@ impl Graphics {
match color { match color {
Color::Black => { Color::Black => {
buffer[idx] = !filling; buffer[idx] = filling;
}, },
Color::White => { Color::White => {
buffer[idx] = filling; buffer[idx] = !filling;
} }
} }
} }