-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Display: add diagnostic test_card option #6608
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6608 +/- ##
==========================================
- Coverage 53.70% 53.46% -0.25%
==========================================
Files 50 50
Lines 9408 9545 +137
Branches 1654 1685 +31
==========================================
+ Hits 5053 5103 +50
- Misses 4056 4131 +75
- Partials 299 311 +12 ☔ View full report in Codecov by Sentry. |
As with all ESPHome code, we prefer not to have "magical" things happen like this. It would make more sense if it was a function to call inside the lambda or a page: lambda: |-
it.test_card(); |
the reason i used the fade_to is to see of the display driver runs in 8 or 16 bit mode. Having just a couple of blocks does not show that 100%. And it cost not that much time extra. The testcard is just called once after that the poller is stopt. |
Yes, i will do this. |
Is this how you see it on your display? |
Yes. Found the reason - https://github.com/esphome/esphome/pull/6608/files#r1575898035 |
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
Okay thanks. your suggestion is added. |
Thinking about it a bit more i decided to make it much easier to popup the testcard. |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Clyde could you hummer me, why your fix works better then what i did? I just cant understand. And i want to learn from my mistake. :D |
In your original code you had this:
So
and the arguments to
So e.g. a value for Any portrait mode with height greater than 255 would fail to display as expected (as would landscape mode between 256 and 280.) So I assume you did not test in portrait mode, or you used a really small display. |
thanks for the explanation. I was looking at the wrong place. and could not figure out what was wrong. |
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working fine here.
Could you make a picture to add to the Display doc? |
What does this implement/fix?
When you start using a display, you want to know if it is showing correct etc.
This PR will show a testcard with the RGB colors, an indicator what the top left corner is and text (R,G,B) to validate how the display oriented.
The main purpose to help people that have issues with there display and want to show what is going on with there display.
Just add the option "
show_testcard: true
" to the display component or addit.test_card();
to your lambda code.Types of changes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3796
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: