diff --git a/klippy/console.py b/klippy/console.py index 50a65485..fccfee0b 100755 --- a/klippy/console.py +++ b/klippy/console.py @@ -153,8 +153,7 @@ class KeyboardReader: self.output("Eval: %s" % (line,)) if self.pins is not None: try: - line = pins.update_command( - line, self.mcu_freq, self.pins).strip() + line = pins.update_command(line, self.pins).strip() except: self.output("Unable to map pin: %s" % (line,)) return None diff --git a/klippy/mcu.py b/klippy/mcu.py index 7bdf71f8..077d6ff8 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -612,8 +612,7 @@ class MCU: updated_cmds = [] for cmd in self._config_cmds: try: - updated_cmds.append(pins.update_command( - cmd, self._mcu_freq, pnames)) + updated_cmds.append(pins.update_command(cmd, pnames)) except: raise pins.error("Unable to translate pin name: %s" % (cmd,)) self._config_cmds = updated_cmds diff --git a/klippy/pins.py b/klippy/pins.py index a9a2ec26..46266ed6 100644 --- a/klippy/pins.py +++ b/klippy/pins.py @@ -161,7 +161,7 @@ def get_pin_map(mcu, mapping_name=None): # Translate pin names in a firmware command re_pin = re.compile(r'(?P[ _]pin=)(?P[^ ]*)') -def update_command(cmd, mcu_freq, pmap): +def update_command(cmd, pmap): def pin_fixup(m): return m.group('prefix') + str(pmap[m.group('name')]) return re_pin.sub(pin_fixup, cmd)