fixes #858 - esphome crashes with neolightbus and RMT (#1667)

Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
Vegetto 2021-04-06 14:31:38 +02:00 committed by GitHub
parent 5c359856ff
commit 3ecae3f16f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,8 @@ class NeoPixelBusLightOutputBase : public light::AddressableLight {
void add_leds(uint16_t count_pixels) { this->add_leds(new NeoPixelBus<T_COLOR_FEATURE, T_METHOD>(count_pixels)); } void add_leds(uint16_t count_pixels) { this->add_leds(new NeoPixelBus<T_COLOR_FEATURE, T_METHOD>(count_pixels)); }
void add_leds(NeoPixelBus<T_COLOR_FEATURE, T_METHOD> *controller) { void add_leds(NeoPixelBus<T_COLOR_FEATURE, T_METHOD> *controller) {
this->controller_ = controller; this->controller_ = controller;
this->controller_->Begin(); // controller gets initialised in setup() - avoid calling twice (crashes with RMT)
// this->controller_->Begin();
} }
// ========== INTERNAL METHODS ========== // ========== INTERNAL METHODS ==========