klippy: Introduce load_config_prefix() for modules that take parameters
Use both load_config() and load_config_prefix() functions when dynamically loading a module from the extras directory - if the config section name has parameters in it then use load_config_prefix(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -26,5 +26,5 @@ class ad5206:
|
||||
self.mcu.add_config_cmd(
|
||||
"send_spi_message pin=%s msg=%02x%02x" % (self.pin, i, val))
|
||||
|
||||
def load_config(config):
|
||||
def load_config_prefix(config):
|
||||
return ad5206(config)
|
||||
|
||||
Reference in New Issue
Block a user