mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-11-04 20:36:00 +01:00
klippy: Allow each module to define their config sections
Create add_printer_objects() functions in the fan, heater, extruder, and toolhead modules. Create the necessary printer component objects from this call instead of placing the code directly in klippy.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -308,3 +308,8 @@ class ControlBumpTest:
|
||||
return True
|
||||
self.heater.control = self.old_control
|
||||
return False
|
||||
|
||||
def add_printer_objects(printer, config):
|
||||
if config.has_section('heater_bed'):
|
||||
printer.add_object('heater_bed', PrinterHeater(
|
||||
printer, config.getsection('heater_bed')))
|
||||
|
||||
Reference in New Issue
Block a user