controller_fan: Replace else followed by single if with elif

Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
This commit is contained in:
Master92 2019-09-16 13:20:49 +02:00 committed by KevinOConnor
parent 4e09cacece
commit fd2f17f847
1 changed files with 3 additions and 4 deletions

View File

@ -44,10 +44,9 @@ class ControllerFan:
if active: if active:
self.last_on = 0 self.last_on = 0
power = self.max_power power = self.max_power
else: elif self.last_on < self.idle_timeout:
if self.last_on < self.idle_timeout: power = self.idle_speed
power = self.idle_speed self.last_on += 1
self.last_on += 1
print_time = self.mcu.estimated_print_time(eventtime) + PIN_MIN_TIME print_time = self.mcu.estimated_print_time(eventtime) + PIN_MIN_TIME
self.fan.set_speed(print_time, power) self.fan.set_speed(print_time, power)
return eventtime + 1. return eventtime + 1.