From 136dccbcdfc6a20c8b6755afdfb65891cee3d1a7 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 29 Apr 2017 13:57:02 -0400 Subject: 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 --- klippy/heater.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'klippy/heater.py') diff --git a/klippy/heater.py b/klippy/heater.py index c4e0a715..21624cb0 100644 --- a/klippy/heater.py +++ b/klippy/heater.py @@ -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'))) -- cgit v1.2.3-70-g09d2