mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-14 02:07:56 -06:00
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>
This commit is contained in:
parent
d858498a53
commit
17123889f6
16 changed files with 50 additions and 45 deletions
|
@ -14,6 +14,7 @@ class ControllerFan:
|
|||
self.stepper_names = []
|
||||
self.stepper_enable = self.printer.try_load_module(config,
|
||||
'stepper_enable')
|
||||
self.printer.try_load_module(config, 'heaters')
|
||||
self.heaters = []
|
||||
self.fan = fan.PrinterFan(config)
|
||||
self.mcu = self.fan.mcu_fan.get_mcu()
|
||||
|
@ -27,8 +28,8 @@ class ControllerFan:
|
|||
self.heater_name = config.get("heater", "extruder")
|
||||
self.last_on = self.idle_timeout
|
||||
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(',')]
|
||||
kin = self.printer.lookup_object('toolhead').get_kinematics()
|
||||
self.stepper_names = [s.get_name() for s in kin.get_steppers()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue