Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for displays with blacktab colors and greentab offsets #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samo-sk
Copy link

@samo-sk samo-sk commented Aug 11, 2023

This change fixes #191, #180 and #154 by creating a flag named INITR_BLACKTAB_OFFSETS for initR for the displays described in the issue reports. When initR is called with this flag, the commands for second stage initialization of greentab displays are used, but MADCTL is modified like when INITR_BLACKTAB is used. I have also modified Adafruit_ST7735::setRotation, as it alters MADCTL. I have simplified the function to avoid repeating code for checking if the color order flag in MADCTL should be changed. This change is tested, it works on the mentioned displays and doesn't alter the functionality when INITR_BLACKTAB or INITR_GREENTAB is used.
This pull request aims to fix the same issue as #168, which contains a bug that causes an erroneous modification of its behavior when initR is used with INITR_GREENTAB, which I have described in comments below that pull request.
My pull request doesn't modify the examples, as I wasn't sure if adding a commented out initR with INITR_BLACKTAB_OFFSETS to e.g. graphicstest is suitable, as this type of displays isn't an official one.
PS: In #191, I was told to contact Deek-Robot rather than submitting a pull request myself. I decided otherwise, as their website doesn't list my TFT as one of their products (even though the URL of the company is written on the display) and I didn't want to risk waiting for a long time if I can fix this myself. Another reason is that this issue isn't exclusive to Deek-Robot displays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deek-Robot TFT
1 participant