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:
@@ -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')))
|
||||
|
||||
Reference in New Issue
Block a user