1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 22:28:14 +00:00

Add init values and remove extra set in init.py

This commit is contained in:
Jonathan Swoboda 2025-02-20 10:05:31 -05:00
parent 087ca18a9a
commit c87e80828d
2 changed files with 6 additions and 8 deletions

View File

@ -86,7 +86,7 @@ class ESP32RMTLEDStripLightOutput : public light::AddressableLight {
rmt_encoder_handle_t encoder_{nullptr};
rmt_symbol_word_t *rmt_buf_{nullptr};
rmt_symbol_word_t bit0_, bit1_, reset_;
uint32_t rmt_symbols_;
uint32_t rmt_symbols_{48};
#else
rmt_item32_t *rmt_buf_{nullptr};
rmt_item32_t bit0_, bit1_, reset_;
@ -95,12 +95,12 @@ class ESP32RMTLEDStripLightOutput : public light::AddressableLight {
uint8_t pin_;
uint16_t num_leds_;
bool is_rgbw_;
bool is_wrgb_;
bool use_dma_;
bool use_psram_;
bool is_rgbw_{false};
bool is_wrgb_{false};
bool use_dma_{false};
bool use_psram_{false};
RGBOrder rgb_order_;
RGBOrder rgb_order_{ORDER_RGB};
uint32_t last_refresh_{0};
optional<uint32_t> max_refresh_rate_{};

View File

@ -215,8 +215,6 @@ async def to_code(config):
cg.add(var.set_rmt_symbols(config[CONF_RMT_SYMBOLS]))
if CONF_USE_DMA in config:
cg.add(var.set_use_dma(config[CONF_USE_DMA]))
else:
cg.add(var.set_use_dma(False))
else:
rmt_channel_t = cg.global_ns.enum("rmt_channel_t")
cg.add(