From fd2f17f847ebfbeca17898253be4858d7c54b62e Mon Sep 17 00:00:00 2001 From: Master92 Date: Mon, 16 Sep 2019 13:20:49 +0200 Subject: [PATCH] controller_fan: Replace else followed by single if with elif Signed-off-by: Nils Friedchen --- klippy/extras/controller_fan.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/klippy/extras/controller_fan.py b/klippy/extras/controller_fan.py index 0d2dc37d..9837b212 100644 --- a/klippy/extras/controller_fan.py +++ b/klippy/extras/controller_fan.py @@ -44,10 +44,9 @@ class ControllerFan: if active: self.last_on = 0 power = self.max_power - else: - if self.last_on < self.idle_timeout: - power = self.idle_speed - self.last_on += 1 + elif self.last_on < self.idle_timeout: + power = self.idle_speed + self.last_on += 1 print_time = self.mcu.estimated_print_time(eventtime) + PIN_MIN_TIME self.fan.set_speed(print_time, power) return eventtime + 1.