mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 07:28:10 +01:00
Update addressable_light_effect.h
This commit is contained in:
parent
295585379e
commit
e6ff3c287d
1 changed files with 1 additions and 7 deletions
|
@ -31,13 +31,9 @@ class AddressableLightEffect : public LightEffect {
|
||||||
void start_internal() override {
|
void start_internal() override {
|
||||||
this->get_addressable_()->set_effect_active(true);
|
this->get_addressable_()->set_effect_active(true);
|
||||||
this->get_addressable_()->clear_effect_data();
|
this->get_addressable_()->clear_effect_data();
|
||||||
this->high_freq_.start();
|
|
||||||
this->start();
|
this->start();
|
||||||
}
|
}
|
||||||
void stop() override {
|
void stop() override { this->get_addressable_()->set_effect_active(false); }
|
||||||
this->get_addressable_()->set_effect_active(false);
|
|
||||||
this->high_freq_.stop();
|
|
||||||
}
|
|
||||||
virtual void apply(AddressableLight &it, const ESPColor ¤t_color) = 0;
|
virtual void apply(AddressableLight &it, const ESPColor ¤t_color) = 0;
|
||||||
void apply() override {
|
void apply() override {
|
||||||
LightColorValues color = this->state_->remote_values;
|
LightColorValues color = this->state_->remote_values;
|
||||||
|
@ -50,8 +46,6 @@ class AddressableLightEffect : public LightEffect {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AddressableLight *get_addressable_() const { return (AddressableLight *) this->state_->get_output(); }
|
AddressableLight *get_addressable_() const { return (AddressableLight *) this->state_->get_output(); }
|
||||||
|
|
||||||
HighFrequencyLoopRequester high_freq_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AddressableLambdaLightEffect : public AddressableLightEffect {
|
class AddressableLambdaLightEffect : public AddressableLightEffect {
|
||||||
|
|
Loading…
Reference in a new issue