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

[ILI9xxx] Update ili9xxx_init.h code for the ILI9488 display for correct white balance #4849

Merged
merged 3 commits into from May 22, 2023

Conversation

lucasreiners
Copy link
Contributor

What does this implement/fix?

Recently I had a project using an ILI9488 based display. I found out, that the white balance of the display is incorrect - during the initialization sequence of the display, some gamma values are set, which I improved in this pull request (I also used the official documentation for the display, but tweaked the values further.

You can see the difference in the following image (left is AFTER the change, right is BEFORE - the large numbers on the right are now displayed correctly in white, on the right with the existing init code, the values are displayed in a light blue instead of white):
CDA8ACB4-EC1D-4210-A950-FF938F080D98-COLLAGE

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): n/a

Pull request in esphome-docs with documentation (if applicable):
n/a

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome
Copy link

Hey there @nielsnl68, mind taking a look at this pull request as it has been labeled with an integration (ili9xxx) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

Copy link
Contributor

@nielsnl68 nielsnl68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very nice.

@kroimon
Copy link
Contributor

kroimon commented May 18, 2023

Are these gamma values usable for all displays based on the ILI9488 or might it depend on the actual panel?

Where did the previous values come from? Were they just copied from somewhere else and are really bad or do they just not fit to your panel?

@nielsnl68
Copy link
Contributor

yes, i copied from one of the existing gui lib's .

@lucasreiners
Copy link
Contributor Author

lucasreiners commented May 19, 2023

Thank you for your review, I had to rebase on the latest changes, so the approvals have been reset.

@kroimon thank you for the questions - whether these values fit every panel, I cannot answer, at least for my panel they did not fit. Unfortunately, I dont have any other 9488 based displays from another vendor, so I cannot test any further. :/

@kroimon
Copy link
Contributor

kroimon commented May 22, 2023

Unfortunately, I dont have any other 9488 based displays from another vendor, so I cannot test any further. :/

As even @nielsnl68 approves as the code owner, I would suggest just running a scream test then: merge this PR and if it breaks for someone else, they will scream 😉

@lucasreiners
Copy link
Contributor Author

Unfortunately, I dont have any other 9488 based displays from another vendor, so I cannot test any further. :/

As even @nielsnl68 approves as the code owner, I would suggest just running a scream test then: merge this PR and if it breaks for someone else, they will scream 😉

Sounds great! 😄
@nielsnl68 feel free to merge, if you second this approach

@jesserockz jesserockz merged commit 40d110f into esphome:dev May 22, 2023
25 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants