Ili9341 8bit indexed mode pt2 (#2502)

This commit is contained in:
Dave T
2022-12-22 06:53:53 +00:00
committed by GitHub
parent b76c7a0131
commit ecbbf2d3f4
2 changed files with 67 additions and 6 deletions
@@ -122,7 +122,12 @@ void ILI9341Display::display_() {
}
void ILI9341Display::fill(Color color) {
uint8_t color332 = display::ColorUtil::color_to_332(color, display::ColorOrder::COLOR_ORDER_RGB);
uint8_t color332 = 0;
if (this->buffer_color_mode_ == BITS_8) {
color332 = display::ColorUtil::color_to_332(color);
} else { // if (this->buffer_color_mode_ == BITS_8_INDEXED)
color332 = display::ColorUtil::color_to_index8_palette888(color, this->palette_);
}
memset(this->buffer_, color332, this->get_buffer_length_());
this->x_low_ = 0;
this->y_low_ = 0;