mcu: Rename add_config_object() to register_config_callback()

Change the name of the config registration method and pass an explicit
reference to the callback to the new method.  This makes the
relationship between mcu registration and build_config() more clear in
the calling code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-09-03 11:48:22 -04:00
parent a8d4a7ef46
commit 30013a1fb8
10 changed files with 29 additions and 26 deletions

View File

@@ -112,7 +112,7 @@ class TMC2208:
self.tx_pin = tx_pin_params['pin']
self.oid = self.mcu.create_oid()
self.tmcuart_send_cmd = None
self.mcu.add_config_object(self)
self.mcu.register_config_callback(self.build_config)
# Add DUMP_TMC command
gcode = self.printer.lookup_object("gcode")
gcode.register_mux_command(