Closed kevinfrei closed 2 years ago
Please test that this works in all rotations. This particular display has a centered rectangle inside a larger 320x240 memory buffer allowing for an offset of 52 on one side and 53 on the other (due to the odd 135 width), which is affected by different rotations.
Will do! I'll report back when I've validated it (or changed the PR :) )
Good call. I made a test that demonstrates the problem (both for the baseline, and it demonstrates that my PR doesn't quite fix it properly). I'll fix it and put up a new PR when it's fixed (with a link to the test, as well :) )
This change only modifies the offsets for rendering on the 1.13" 135x240 LCD (https://www.adafruit.com/product/4383)
Prior to this change, if you did this: tft.fillScreen(ST77XX_WHITE); tft.setRotatation(1); tft.fillScreen(ST77XX_BLACK);
you would wind up with the top line (where 'top' is the row of pixels closest to the solder holes) being white. It just looks like the offset was off by one, thanks to an odd width value.
Please let me know if there's any specific testing/validation you want. I'm running this on a Teensy 4.0 at 600MHz, with an SPI clock set to 60MHz. I've validated the issue is consistent across much slower clock frequencies for both the MPU and the SPI bus.