1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00

[hub75] Fix depth and gamma mode defines (#13091)

This commit is contained in:
Stuart Parmenter
2026-01-08 23:56:51 -08:00
committed by GitHub
parent cd43b4114e
commit 7576e032f8

View File

@@ -550,12 +550,12 @@ async def to_code(config: ConfigType) -> None:
ref="0.2.2",
)
# Set compile-time configuration via defines
# Set compile-time configuration via build flags (so external library sees them)
if CONF_BIT_DEPTH in config:
cg.add_define("HUB75_BIT_DEPTH", config[CONF_BIT_DEPTH])
cg.add_build_flag(f"-DHUB75_BIT_DEPTH={config[CONF_BIT_DEPTH]}")
if CONF_GAMMA_CORRECT in config:
cg.add_define("HUB75_GAMMA_MODE", config[CONF_GAMMA_CORRECT])
cg.add_build_flag(f"-DHUB75_GAMMA_MODE={config[CONF_GAMMA_CORRECT]}")
# Await all pin expressions
pin_expressions = {