mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
Linting
This commit is contained in:
parent
bd2638eb6a
commit
42f50e642d
1 changed files with 3 additions and 3 deletions
|
@ -67,11 +67,11 @@ void SlowPWMOutput::loop() {
|
|||
ESP_LOGVV(TAG, "Current cycle reduced to %d ms to obey max period", this->current_period_);
|
||||
}
|
||||
|
||||
if (this->state_ == 0)
|
||||
if (this->state_ == 0) {
|
||||
scaled_state = 0;
|
||||
else if (this->state_ == 1)
|
||||
} else if (this->state_ == 1) {
|
||||
scaled_state = (float) this->current_period_;
|
||||
else {
|
||||
} else {
|
||||
scaled_state = std::min(std::max((float) this->min_time_on_, this->state_ * this->current_period_),
|
||||
(float) this->current_period_ - this->min_time_off_);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue