diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-04-29 13:57:02 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-06-09 18:54:34 -0400 |
commit | 136dccbcdfc6a20c8b6755afdfb65891cee3d1a7 (patch) | |
tree | fb195571d64d97f79c6197c9c46d02319d347356 /klippy/extruder.py | |
parent | d0e6a0928b483f29a3bcfd86d16192bef5652042 (diff) | |
download | kutter-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.py | 5 |
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'))) |