input_shaper: Restore shaper_type config option

The shaper_type config option got removed in commit d5a7a7f0 - restore
that option.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-10-26 18:06:11 -04:00
parent 54e21a7c26
commit b62171f350
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,8 @@ class InputShaperParams:
def __init__(self, axis, config):
self.axis = axis
self.shapers = {s.name : s.init_func for s in shaper_defs.INPUT_SHAPERS}
self.shaper_type = config.get('shaper_type_' + axis, 'mzv').lower()
shaper_type = config.get('shaper_type', 'mzv')
self.shaper_type = config.get('shaper_type_' + axis, shaper_type)
if self.shaper_type not in self.shapers:
raise config.error(
'Unsupported shaper type: %s' % (self.shaper_type,))