adafruit / Adafruit_RA8875

Adafruit Arduino library driver for the RA8875 TFT driver
http://www.adafruit.com/products/1590
Other
68 stars 58 forks source link

Fix to support textEnlarge on additional CPUs #16

Closed ronguest closed 5 years ago

ronguest commented 5 years ago

The actual change starts on line 414 in textWrite() of the cpp file. The text encoding of the original file creates bogus diffs and I couldn't find a way around that. Even GitHub on the web said it would convert the original file.

The problem: textEnlarge() of 2 or greater resulted in garbled text when run on an ESP32 or ESP8266. In looking at the original code it was written such that if run on anything other than an AVR or arm no delay was being added at all. My change makes the original AVR delay behavior the default. So when run on any board other than an arm it uses the same threshold as was originally used for the AVR otherwise it behaves as described for the teensy. I've tested this at all textEnlarge() settings and it works fine for me (don't have a Teensy though). My test program was based on the example code and included drawing both objects (lines, circles etc) as well as drawing text. I put the code in a loop and had it iterate and it was stable over a 30 minute period.

ladyada commented 5 years ago

wow cool - thank you! could you fix the PR so the degree-symbols arent broken? lookes like that came in with your edits

image

ronguest commented 5 years ago

Sorry about that. There were two comment sections where the degree symbols got munged. My latest commit fixes those. When I look at the file in this pull request on Github it now looks like a degree symbol so I think it is ok.

ladyada commented 5 years ago

thanks!