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

tft: restore ILI9341 colors and reversed logic #19010

Merged
merged 3 commits into from
Aug 14, 2020

Conversation

tpruvot
Copy link
Contributor

@tpruvot tpruvot commented Aug 13, 2020

ILI9341 init code was recently changed to 9488 init (last 10 days)

This restore the right colors and the reversed display, like it was originally.

also, the X & Y offsets of the dogm UI are no more centered on 320x240 displays.... the dogm ui is touching the right border...

@thisiskeithb
Copy link
Member

thisiskeithb commented Aug 13, 2020

Maybe two similar displays need different settings? #18877 Also, @rhapsodyv has been doing a lot of work for the MKS Robin Nano + tethered TFTs.

@tpruvot
Copy link
Contributor Author

tpruvot commented Aug 13, 2020

was changed by #18901 for the colors issue (black is white now)

9341 is a 320x240, 9488 a 480x320

@thisiskeithb
Copy link
Member

thisiskeithb commented Aug 13, 2020

This may need some adjustment/ways to change colors for other TFTs since the colors are correct on MKS Robin Nano boards with their tethered TFTs using the previous code (#18901 (comment)).

@tpruvot
Copy link
Contributor Author

tpruvot commented Aug 13, 2020

yes, but MKS Robin nano is not using an ILI9341

@tpruvot tpruvot changed the title tft: restore 9341 colors and reversed logic tft: restore ILI9341 colors and reversed logic Aug 13, 2020
@tpruvot
Copy link
Contributor Author

tpruvot commented Aug 13, 2020

1 = reverse for the 0x36 command... well... we have 3 kinds of touchscreen orientation and the define reverse our touch settings... we have a calibration app... and hmm, its not really documented for MY/MX bits... 0xE8 vs 0x28

image

@rhapsodyv
Copy link
Member

rhapsodyv commented Aug 13, 2020

The code is different, but they were in the same switch case.
Nano and tronxy is 0x8066.
Testing the right value for nano, I edited the code and forgot to separate.
@tpruvot is right and his change is welcomed, as he separate the case.

@rhapsodyv
Copy link
Member

@tpruvot if you don't mind and have some time, take a look and test this PR in your 320x240 screen: #19017

@thinkyhead
Copy link
Member

Funny, because when first submitted, I was going to fill in all those device init cases with what we've ended up with, but I didn't want to presume….

@rhapsodyv
Copy link
Member

Funny, because when first submitted, I was going to fill in all those device init cases with what we've ended up with, but I didn't want to presume….

It's another think that is repeated.
After the tft io refactoring, we can try merging the init codes from emulated dogm and those from the new color ui.
It will allow more tft using both ui.

@thinkyhead thinkyhead merged commit 567d77f into MarlinFirmware:bugfix-2.0.x Aug 14, 2020
@thinkyhead
Copy link
Member

I figured there would be some redundancy with TFT code arriving from so many quarters at the same time, but that's how we roll. Elaboration and piling up code while developing and testing, then revision and optimization once it works reliably — and once we have a reasonable understanding of how it all works.

@rhapsodyv
Copy link
Member

rhapsodyv commented Aug 14, 2020

Sure. I began the tft io refactoring after fixing the fsmc psram bug in 3 different places with the same code heheh.
In my other projects, I follow the same philosophy.

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

Successfully merging this pull request may close these issues.

4 participants