mirror of
https://github.com/esphome/esphome.git
synced 2026-05-27 03:36:19 +08:00
[hub75] Fix gamma_correct to use enum value instead of key string (#13102)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -555,7 +555,7 @@ async def to_code(config: ConfigType) -> None:
|
|||||||
cg.add_build_flag(f"-DHUB75_BIT_DEPTH={config[CONF_BIT_DEPTH]}")
|
cg.add_build_flag(f"-DHUB75_BIT_DEPTH={config[CONF_BIT_DEPTH]}")
|
||||||
|
|
||||||
if CONF_GAMMA_CORRECT in config:
|
if CONF_GAMMA_CORRECT in config:
|
||||||
cg.add_build_flag(f"-DHUB75_GAMMA_MODE={config[CONF_GAMMA_CORRECT]}")
|
cg.add_build_flag(f"-DHUB75_GAMMA_MODE={config[CONF_GAMMA_CORRECT].enum_value}")
|
||||||
|
|
||||||
# Await all pin expressions
|
# Await all pin expressions
|
||||||
pin_expressions = {
|
pin_expressions = {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ display:
|
|||||||
panel_height: 32
|
panel_height: 32
|
||||||
double_buffer: true
|
double_buffer: true
|
||||||
brightness: 128
|
brightness: 128
|
||||||
|
gamma_correct: gamma_2_2
|
||||||
pages:
|
pages:
|
||||||
- id: page1
|
- id: page1
|
||||||
lambda: |-
|
lambda: |-
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ display:
|
|||||||
panel_height: 32
|
panel_height: 32
|
||||||
double_buffer: true
|
double_buffer: true
|
||||||
brightness: 128
|
brightness: 128
|
||||||
|
gamma_correct: cie1931
|
||||||
r1_pin: GPIO42
|
r1_pin: GPIO42
|
||||||
g1_pin: GPIO41
|
g1_pin: GPIO41
|
||||||
b1_pin: GPIO40
|
b1_pin: GPIO40
|
||||||
|
|||||||
Reference in New Issue
Block a user