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: fix white screen on binary displays #4991
Conversation
For now tested with SSD1306 and it is working fine.SH1107 is still broken - like wrong init. |
I guess, it is another issue :) |
SH1107 (which is still driven by ssd1306 component; eg. FeatherWing OLED - 128x64) works with this patch: - source: github://bekriebel/esphome@sh1107_fix
components:
- ssd1306_base
- ssd1306_i2c
- ssd1306_spi Anybody who has review capabilites would care to make a PR out of it? |
yea, I thought it was merged as I tested it a long time ago :D - so we need to wait for that PR. |
Actually you don't need review capabilities to create a PR; just to get it merged ;-) |
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.
Looks good.
Seems to fix the issue (according to the feedback), and it does not break the transparency implementation.
What does this implement/fix?
This a bug introduced by #4600.
It changed
COLOR_OFF
for reasons not related to the merged PR.The potential problem with
COLOR_OFF
is steaming from sometimesa wrong assumption that
Color
representsRGBA
, where-as it doesin fact represents
RGBW
.In case of some displays the
W
is considered as a white-level,and binary displays expect the value of a pixel to be
0
for pixel to be off.The binary pixel is checked via
Color#is_on()
which does look atthis->raw_32 != 0
.This does not change how of transparent images are displayed on color/grayscale displays.
Since for transparent pixels are not render at all.
It does not fix rendering of the
PNG
images on binary displays (which is broken currently),as incorrect luminance is used.
Types of changes
Test Environment
SSD1306
(binary)gc9a01
(RGB565)Example entry for
config.yaml
:Checklist:
tests/
folder).