BlueAndi / Pixelix

Full RGB LED matrix, based on an ESP32 and WS2812B LEDs.
MIT License
300 stars 59 forks source link

[Feature] Add rotate display 180deg for T-Display-S3 #148

Closed P1X3L8 closed 1 year ago

P1X3L8 commented 1 year ago

I didn't see any easy way of doing this in the code. TY

nhjschulz commented 1 year ago

Is it is only for the display on the T-Display-S3 and you don't need dynamic configuration through the UI ? Then this single line change should do the trick:

Add the line "m_tft.setRotation(2);" into file lib\HalTftDisplay\src\Display.h, function begin() as shown below.

/**
     * Initialize base driver for the display.
     *
     * @return If successful, returns true otherwise false.
     */
    bool begin() final
    {
        m_tft.init();
        m_tft.setRotation(2);
        m_tft.fillScreen(TFT_BLACK);

        return true;
    }
P1X3L8 commented 1 year ago

Hi nhjschulz, this worked, thank you!

BlueAndi commented 1 year ago

Thanks nhjschulz for providing this feature.