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:
@@ -71,6 +71,4 @@ class DeltaCalibrate:
|
||||
new_params['radius']))
|
||||
|
||||
def load_config(config):
|
||||
if config.get_name() != 'delta_calibrate':
|
||||
raise config.error("Invalid delta_calibrate config name")
|
||||
return DeltaCalibrate(config)
|
||||
|
||||
Reference in New Issue
Block a user