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:
Kevin O'Connor 2018-02-03 12:53:11 -05:00
parent 7e3adde542
commit f4bfce260a
11 changed files with 12 additions and 18 deletions

View file

@ -55,5 +55,5 @@ class PrinterServo:
else:
self.set_angle(print_time, self.gcode.get_float('ANGLE', params))
def load_config(config):
def load_config_prefix(config):
return PrinterServo(config)