Skip to content

Commit e29be7a

Browse files
committed
Updates RGB driver to hopefully correct an issue with a black line showing up.
1 parent 662a3bc commit e29be7a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext_mod/lcd_bus/esp32_src/rgb_bus_rotation.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
if(x_start == 0 && x_end == (dst_width - 1) && !rgb565_dither) {
381381
memcpy(dst, src, dst_width * (y_end - y_start + 1) * bytes_per_pixel);
382382
} else {
383-
uint32_t src_bytes_per_line = (x_end - x_start + 1) * bytes_per_pixel;
383+
uint32_t src_bytes_per_line = (x_end - x_start) * bytes_per_pixel;
384384
uint32_t dst_bytes_per_line = dst_width * bytes_per_pixel;
385385

386386
if (rgb565_dither) {
@@ -409,7 +409,7 @@
409409
uint32_t i;
410410
uint32_t j;
411411

412-
uint32_t src_bytes_per_line = x_end - x_start + 1;
412+
uint32_t src_bytes_per_line = x_end - x_start;
413413
uint32_t offset = y_start * src_bytes_per_line + x_start;
414414

415415
switch (rotate) {
@@ -468,7 +468,7 @@
468468
uint32_t i;
469469
uint32_t j;
470470

471-
uint32_t src_bytes_per_line = x_end - x_start + 1;
471+
uint32_t src_bytes_per_line = x_end - x_start;
472472
uint32_t offset = y_start * src_bytes_per_line + x_start;
473473

474474
if (rgb565_dither) {
@@ -577,7 +577,7 @@
577577
uint32_t i;
578578
uint32_t j;
579579

580-
uint32_t src_bytes_per_line = (x_end - x_start + 1) * 3;
580+
uint32_t src_bytes_per_line = (x_end - x_start) * 3;
581581
uint32_t offset = y_start * src_bytes_per_line + x_start * 3;
582582

583583
switch (rotate) {
@@ -636,7 +636,7 @@
636636
uint32_t i;
637637
uint32_t j;
638638

639-
uint32_t src_bytes_per_line = x_end - x_start + 1;
639+
uint32_t src_bytes_per_line = x_end - x_start;
640640
uint32_t offset = y_start * src_bytes_per_line + x_start;
641641

642642
switch (rotate) {

0 commit comments

Comments
 (0)