loboris / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
553 stars 219 forks source link

New Display - ST7789V on TTGO - Inverted Colours #84

Open RichardPar opened 4 years ago

RichardPar commented 4 years ago

Hi there,

I got the ESP32 with an OLED display build on by TTGO. It has a pretty standard controller except the pixels are offset to get to location 0.0 (They are actually 52.40) I added code to offset the X and Y but now the colours seem inverted. Selecting TFT_BLACK results in writing in WHITE. I have tried using the function TFT_invertDisplay(INVERT_ON) but that does not seem to do anything. Is there another way to correct the colours ?

Richard

Image of board.. https://i.ebayimg.com/00/s/MTAwMVgxMDAx/z/V4QAAOSwdUxddzs6/$_10.JPG?set_id=880000500F

Added code for _offsets .. its not generic as this is an experiment.

https://github.com/RichardPar/ESP32_TFT_library/commit/954110cfd9a00699c1c890a89811ccfd853b5117

=========== BASIC CONFIG ====================

define DEFAULT_DISP_TYPE DISP_TYPE_ST7789V

define DEFAULT_TFT_DISPLAY_WIDTH 188-52

define DEFAULT_TFT_DISPLAY_HEIGHT 280-40

define DISP_COLOR_BITS_24 0x66

define DEFAULT_GAMMA_CURVE 1

define DEFAULT_SPI_CLOCK 26000000

define TFT_INVERT_ROTATION 0

define TFT_INVERT_ROTATION1 1

define TFT_RGB_BGR 0x00

frhun commented 4 years ago

I added pretty much full support for the TTGO T-Display here: https://github.com/jeremyjh/ESP32_TFT_library/pull/4