Skip to content

Commit

Permalink
ILI9XXX: Restore offset usage in set_addr_window (esphome#6147)
Browse files Browse the repository at this point in the history
  • Loading branch information
clydebarrow authored Jan 26, 2024
1 parent 25ab6f0 commit f2caf13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions esphome/components/ili9xxx/ili9xxx_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ void ILI9XXXDisplay::init_lcd_() {

// Tell the display controller where we want to draw pixels.
void ILI9XXXDisplay::set_addr_window_(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) {
x1 += this->offset_x_;
x2 += this->offset_x_;
y1 += this->offset_y_;
y2 += this->offset_y_;
this->command(ILI9XXX_CASET);
this->data(x1 >> 8);
this->data(x1 & 0xFF);
Expand Down

0 comments on commit f2caf13

Please sign in to comment.