aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pins.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-08-25 23:21:55 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-08-26 18:27:21 -0400
commit68ba3d51065f56947e4c2d7d76f46b7b8913f61a (patch)
tree8487d0d2ff7901be6bd37b4f8526da6ddbe21cd4 /klippy/pins.py
parent80dc1dfcc16753802c80603f3f21b175dbe48608 (diff)
downloadkutter-68ba3d51065f56947e4c2d7d76f46b7b8913f61a.tar.gz
kutter-68ba3d51065f56947e4c2d7d76f46b7b8913f61a.tar.xz
kutter-68ba3d51065f56947e4c2d7d76f46b7b8913f61a.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/pins.py')
-rw-r--r--klippy/pins.py7
1 files changed, 2 insertions, 5 deletions
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<prefix>[ _]pin=)(?P<name>[^ ]*)')
-re_ticks = re.compile(r'TICKS\((?P<ticks>[^)]*)\)')
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)
######################################################################