fan: Support calling set_speed() without a print_time

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2024-09-21 15:42:26 -04:00
parent 1c0adb9af8
commit f4143af4fa
4 changed files with 9 additions and 13 deletions

View file

@ -62,9 +62,7 @@ class ControllerFan:
self.last_on += 1
if speed != self.last_speed:
self.last_speed = speed
curtime = self.printer.get_reactor().monotonic()
print_time = self.fan.get_mcu().estimated_print_time(curtime)
self.fan.set_speed(print_time + PIN_MIN_TIME, speed)
self.fan.set_speed(speed)
return eventtime + 1.
def load_config_prefix(config):