controller_fan: Replace else followed by single if with elif
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
This commit is contained in:
parent
4e09cacece
commit
fd2f17f847
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue