adafruit / Adafruit-ST7735-Library

This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618
https://learn.adafruit.com/1-8-tft-display
565 stars 305 forks source link

Using new vars to allow setting WIDTH and HEIGHT to constants #113

Closed makermelissa closed 4 years ago

makermelissa commented 4 years ago

When I applied a fix so that the tft.width() and tft.height() functions returned the correct values in #111 , I did it in more of a quick fix manner and just changed the WIDTH and HEIGHT parameters. However, this isthe only place they are ever changed and in order for https://github.com/adafruit/Adafruit-GFX-Library/pull/270 to not break this library, this change is needed. I tested using @caternuson's test script from #110 and the dimensions came back correct.

hachi commented 4 years ago

This PR broke 1.14" devices at rotation 2 and 3.

There are still references to WIDTH and HEIGHT at https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7789.cpp#L157 and https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7789.cpp#L169