From 68ba3d51065f56947e4c2d7d76f46b7b8913f61a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 25 Aug 2017 23:21:55 -0400 Subject: mcu: Drop support for TICKS() expansion in mcu config commands It's no longer necessary to use the TICKS() hack as the config commands are now all generated after the mcu speed is known. Signed-off-by: Kevin O'Connor --- klippy/pins.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'klippy/pins.py') diff --git a/klippy/pins.py b/klippy/pins.py index cdfdede0..a9a2ec26 100644 --- a/klippy/pins.py +++ b/klippy/pins.py @@ -159,15 +159,12 @@ def get_pin_map(mcu, mapping_name=None): update_map_beaglebone(pins, mcu) return pins -# Translate pin names and tick times in a firmware command +# Translate pin names in a firmware command re_pin = re.compile(r'(?P[ _]pin=)(?P[^ ]*)') -re_ticks = re.compile(r'TICKS\((?P[^)]*)\)') def update_command(cmd, mcu_freq, pmap): def pin_fixup(m): return m.group('prefix') + str(pmap[m.group('name')]) - def ticks_fixup(m): - return str(int(mcu_freq * float(m.group('ticks')))) - return re_ticks.sub(ticks_fixup, re_pin.sub(pin_fixup, cmd)) + return re_pin.sub(pin_fixup, cmd) ###################################################################### -- cgit v1.2.3-70-g09d2