mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
[lvgl] Fix rotation code for 90deg (Bugfix) (#7653)
This commit is contained in:
parent
ff48f53989
commit
3ac730fb2f
@ -146,7 +146,7 @@ void LvglComponent::draw_buffer_(const lv_area_t *area, lv_color_t *ptr) {
|
|||||||
lv_color_t *dst = this->rotate_buf_;
|
lv_color_t *dst = this->rotate_buf_;
|
||||||
switch (this->rotation) {
|
switch (this->rotation) {
|
||||||
case display::DISPLAY_ROTATION_90_DEGREES:
|
case display::DISPLAY_ROTATION_90_DEGREES:
|
||||||
for (lv_coord_t x = height - 1; x-- != 0;) {
|
for (lv_coord_t x = height; x-- != 0;) {
|
||||||
for (lv_coord_t y = 0; y != width; y++) {
|
for (lv_coord_t y = 0; y != width; y++) {
|
||||||
dst[y * height + x] = *ptr++;
|
dst[y * height + x] = *ptr++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user