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/toolhead.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'klippy/toolhead.py') diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 4329a712..7b25c7e5 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -382,3 +382,6 @@ class ToolHead: self.reset_print_time() except: logging.exception("Exception in force_shutdown") + +def add_printer_objects(printer, config): + printer.add_object('toolhead', ToolHead(printer, config)) -- cgit v1.2.3-70-g09d2