aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extruder.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-29 13:57:02 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-06-09 18:54:34 -0400
commit136dccbcdfc6a20c8b6755afdfb65891cee3d1a7 (patch)
treefb195571d64d97f79c6197c9c46d02319d347356 /klippy/extruder.py
parentd0e6a0928b483f29a3bcfd86d16192bef5652042 (diff)
downloadkutter-136dccbcdfc6a20c8b6755afdfb65891cee3d1a7.tar.gz
kutter-136dccbcdfc6a20c8b6755afdfb65891cee3d1a7.tar.xz
kutter-136dccbcdfc6a20c8b6755afdfb65891cee3d1a7.zip
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>
Diffstat (limited to 'klippy/extruder.py')
-rw-r--r--klippy/extruder.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/klippy/extruder.py b/klippy/extruder.py
index 0a77902b..a4d6bd5a 100644
--- a/klippy/extruder.py
+++ b/klippy/extruder.py
@@ -210,3 +210,8 @@ class DummyExtruder:
return move.max_cruise_v2
def lookahead(self, moves, flush_count, lazy):
return flush_count
+
+def add_printer_objects(printer, config):
+ if config.has_section('extruder'):
+ printer.add_object('extruder', PrinterExtruder(
+ printer, config.getsection('extruder')))