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:
@@ -90,6 +90,4 @@ class BedTiltCalibrate:
|
||||
z_warn, new_params['x_adjust'], new_params['y_adjust']))
|
||||
|
||||
def load_config(config):
|
||||
if config.get_name() != 'bed_tilt':
|
||||
raise config.error("Invalid bed_tilt config name")
|
||||
return BedTilt(config)
|
||||
|
||||
Reference in New Issue
Block a user