diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-07-03 23:23:24 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-07-05 21:04:04 -0400 |
commit | 3a57608642f87de7c2d53b1642d21d057767c4a3 (patch) | |
tree | bba2370e1a081a228963ee520d3f551d1fe1fca4 /klippy/extras/heater_fan.py | |
parent | 4bdc11a8b3843b73079a2c8dfc8d8c0928c29662 (diff) | |
download | kutter-3a57608642f87de7c2d53b1642d21d057767c4a3.tar.gz kutter-3a57608642f87de7c2d53b1642d21d057767c4a3.tar.xz kutter-3a57608642f87de7c2d53b1642d21d057767c4a3.zip |
fan: Separate out the part cooling fan code from the generic fan code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/heater_fan.py')
-rw-r--r-- | klippy/extras/heater_fan.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/klippy/extras/heater_fan.py b/klippy/extras/heater_fan.py index 5d64160d..d69a7cf4 100644 --- a/klippy/extras/heater_fan.py +++ b/klippy/extras/heater_fan.py @@ -1,6 +1,6 @@ # Support fans that are enabled when a heater is on # -# Copyright (C) 2016-2018 Kevin O'Connor <kevin@koconnor.net> +# Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. from . import fan @@ -15,8 +15,7 @@ class PrinterHeaterFan: self.heater_name = config.get("heater", "extruder") self.heater_temp = config.getfloat("heater_temp", 50.0) self.heaters = [] - self.fan = fan.PrinterFan(config, default_shutdown_speed=1.) - self.mcu = self.fan.mcu_fan.get_mcu() + self.fan = fan.Fan(config, default_shutdown_speed=1.) self.fan_speed = config.getfloat("fan_speed", 1., minval=0., maxval=1.) def handle_ready(self): pheaters = self.printer.lookup_object('heaters') @@ -32,8 +31,8 @@ class PrinterHeaterFan: current_temp, target_temp = heater.get_temp(eventtime) if target_temp or current_temp > self.heater_temp: power = self.fan_speed - print_time = self.mcu.estimated_print_time(eventtime) + PIN_MIN_TIME - self.fan.set_speed(print_time, power) + print_time = self.fan.get_mcu().estimated_print_time(eventtime) + self.fan.set_speed(print_time + PIN_MIN_TIME, power) return eventtime + 1. def load_config_prefix(config): |