mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Merge branch 'lint2' into nrf52_core
This commit is contained in:
commit
f6596e9f3c
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}; // NOLINT(readability-identifier-naming)
|
||||
float max_brightness{1.0}; // NOLINT(readability-identifier-naming)
|
||||
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