mirror of
https://github.com/esphome/esphome.git
synced 2024-11-09 16:57:47 +01:00
[code-quality] Fix variable naming in base_light_effects (#7237)
This commit is contained in:
parent
9663b7d67c
commit
4bd7ba0d30
1 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ class PulseLightEffect : public LightEffect {
|
|||
return;
|
||||
}
|
||||
auto call = this->state_->turn_on();
|
||||
float out = this->on_ ? this->max_brightness : this->min_brightness;
|
||||
float out = this->on_ ? this->max_brightness_ : this->min_brightness_;
|
||||
call.set_brightness_if_supported(out);
|
||||
call.set_transition_length_if_supported(this->on_ ? this->transition_on_length_ : this->transition_off_length_);
|
||||
this->on_ = !this->on_;
|
||||
|
@ -43,8 +43,8 @@ class PulseLightEffect : public LightEffect {
|
|||
void set_update_interval(uint32_t update_interval) { this->update_interval_ = update_interval; }
|
||||
|
||||
void set_min_max_brightness(float min, float max) {
|
||||
this->min_brightness = min;
|
||||
this->max_brightness = max;
|
||||
this->min_brightness_ = min;
|
||||
this->max_brightness_ = max;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -53,8 +53,8 @@ class PulseLightEffect : public LightEffect {
|
|||
uint32_t transition_on_length_{};
|
||||
uint32_t transition_off_length_{};
|
||||
uint32_t update_interval_{};
|
||||
float min_brightness{0.0};
|
||||
float max_brightness{1.0};
|
||||
float min_brightness_{0.0};
|
||||
float max_brightness_{1.0};
|
||||
};
|
||||
|
||||
/// Random effect. Sets random colors every 10 seconds and slowly transitions between them.
|
||||
|
|
Loading…
Reference in a new issue