From 42f50e642ddf2421165a8396b5682840f5e95c5b Mon Sep 17 00:00:00 2001 From: tetele Date: Tue, 22 Oct 2024 21:37:50 +0000 Subject: [PATCH] Linting --- esphome/components/slow_pwm/slow_pwm_output.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/slow_pwm/slow_pwm_output.cpp b/esphome/components/slow_pwm/slow_pwm_output.cpp index 41d51a8cee..4fb0abcbcb 100644 --- a/esphome/components/slow_pwm/slow_pwm_output.cpp +++ b/esphome/components/slow_pwm/slow_pwm_output.cpp @@ -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_); }