Merge pull request #6871 from pepijndevos/pervasivedisplays

allow writing empty color frame
This commit is contained in:
Dan Halbert 2022-09-07 18:34:19 -04:00 committed by GitHub
commit 05e0e98b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,7 @@ STATIC bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t *
uint32_t mask[mask_length];
uint8_t passes = 1;
if (self->core.colorspace.tricolor || self->grayscale) {
if (self->write_color_ram_command != NO_COMMAND) {
passes = 2;
}
for (uint8_t pass = 0; pass < passes; pass++) {
@ -318,11 +318,14 @@ STATIC bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t *
if (pass == 1) {
if (self->grayscale) { // 4-color grayscale
self->core.colorspace.grayscale_bit = 6;
} else { // Tri-color
self->core.colorspace.grayscale = false;
}
}
displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer);
} else if (self->core.colorspace.tricolor) {
self->core.colorspace.grayscale = false;
displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer);
}
} else {
displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer);
}
// Invert it all.
if ((pass == 1 && self->color_bits_inverted) ||