mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-04 03:48:29 +02:00
Miscellaneous Fixes
This commit is contained in:
@@ -8,7 +8,7 @@ from esphomeyaml.components import display, font
|
||||
import esphomeyaml.config_validation as cv
|
||||
from esphomeyaml.const import CONF_FILE, CONF_ID, CONF_RESIZE
|
||||
from esphomeyaml.core import CORE, HexInt
|
||||
from esphomeyaml.cpp_generator import ArrayInitializer, MockObj, Pvariable, RawExpression, add
|
||||
from esphomeyaml.cpp_generator import MockObj, Pvariable, RawExpression, add, safe_exp
|
||||
from esphomeyaml.cpp_types import App
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -59,7 +59,7 @@ def to_code(config):
|
||||
raw_data = MockObj(config[CONF_RAW_DATA_ID])
|
||||
add(RawExpression('static const uint8_t {}[{}] PROGMEM = {}'.format(
|
||||
raw_data, len(data),
|
||||
ArrayInitializer(*[HexInt(x) for x in data], multiline=False))))
|
||||
safe_exp([HexInt(x) for x in data]))))
|
||||
|
||||
rhs = App.make_image(raw_data, width, height)
|
||||
Pvariable(config[CONF_ID], rhs)
|
||||
|
||||
Reference in New Issue
Block a user