1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-08 04:43:46 +01:00

[st7789v] Fix clang-tidy sign comparison errors (#11068)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-10-06 11:24:52 -05:00
committed by GitHub
parent 697cab45dd
commit b532e04ae4

View File

@@ -176,8 +176,9 @@ void ST7789V::write_display_data() {
if (this->eightbitcolor_) {
uint8_t temp_buffer[TEMP_BUFFER_SIZE];
size_t temp_index = 0;
for (int line = 0; line < this->get_buffer_length_(); line = line + this->get_width_internal()) {
for (int index = 0; index < this->get_width_internal(); ++index) {
size_t width = static_cast<size_t>(this->get_width_internal());
for (size_t line = 0; line < this->get_buffer_length_(); line += width) {
for (size_t index = 0; index < width; ++index) {
auto color = display::ColorUtil::color_to_565(
display::ColorUtil::to_color(this->buffer_[index + line], display::ColorOrder::COLOR_ORDER_RGB,
display::ColorBitness::COLOR_BITNESS_332, true));