diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-04-25 13:27:41 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-04-25 14:26:45 -0400 |
commit | 17123889f698e2339049bd18e7ece01b9c53e892 (patch) | |
tree | e6899a2fcb2df8ca4e10bab9a15f0617ed912805 /klippy/extras/heater_fan.py | |
parent | d858498a53fe98ed705595b8639b50b219d6262f (diff) | |
download | kutter-17123889f698e2339049bd18e7ece01b9c53e892.tar.gz kutter-17123889f698e2339049bd18e7ece01b9c53e892.tar.xz kutter-17123889f698e2339049bd18e7ece01b9c53e892.zip |
heaters: Make heater.py an "extras" module
The heater logic is an independent module that does not need to be
treated as part of the "core" klipper 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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/extras/heater_fan.py b/klippy/extras/heater_fan.py index 337dcc09..4a3ace84 100644 --- a/klippy/extras/heater_fan.py +++ b/klippy/extras/heater_fan.py @@ -10,6 +10,7 @@ PIN_MIN_TIME = 0.100 class PrinterHeaterFan: def __init__(self, config): self.printer = config.get_printer() + self.printer.try_load_module(config, 'heaters') self.printer.register_event_handler("klippy:ready", self.handle_ready) self.heater_name = config.get("heater", "extruder") self.heater_temp = config.getfloat("heater_temp", 50.0) @@ -18,8 +19,8 @@ class PrinterHeaterFan: self.mcu = self.fan.mcu_fan.get_mcu() self.fan_speed = config.getfloat("fan_speed", 1., minval=0., maxval=1.) def handle_ready(self): - pheater = self.printer.lookup_object('heater') - self.heaters = [pheater.lookup_heater(n.strip()) + pheaters = self.printer.lookup_object('heaters') + self.heaters = [pheaters.lookup_heater(n.strip()) for n in self.heater_name.split(',')] reactor = self.printer.get_reactor() reactor.register_timer(self.callback, reactor.NOW) |