klippy: No need to pass printer reference to add_printer_objects()

The config reference already stores a reference to the printer object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-07-12 22:26:32 -04:00
parent 5cdba1fda8
commit 7d897d84d7
6 changed files with 20 additions and 18 deletions

View File

@@ -213,11 +213,11 @@ class Printer:
# Create printer components
config = ConfigWrapper(self, fileconfig, 'printer')
for m in [pins, heater, mcu]:
m.add_printer_objects(self, config)
m.add_printer_objects(config)
for section in fileconfig.sections():
self.try_load_module(config, section)
for m in [toolhead, extruder]:
m.add_printer_objects(self, config)
m.add_printer_objects(config)
# Validate that there are no undefined parameters in the config file
valid_sections = { s: 1 for s, o in self.all_config_options }
for section_name in fileconfig.sections():