diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-02-08 20:11:05 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-02-12 13:38:13 -0500 |
commit | 2d7c3a84eefdb584e977747d0b8d84304571b50f (patch) | |
tree | b2696ad66a5fed6160baa3ecff82797c2eeb181e /klippy/extras/tmc2130.py | |
parent | 57e6acbc5c0d479786e924d588b51b3bb34da92a (diff) | |
download | kutter-2d7c3a84eefdb584e977747d0b8d84304571b50f.tar.gz kutter-2d7c3a84eefdb584e977747d0b8d84304571b50f.tar.xz kutter-2d7c3a84eefdb584e977747d0b8d84304571b50f.zip |
manual_stepper: Add an "extras" module for manually controlling a stepper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/tmc2130.py')
-rw-r--r-- | klippy/extras/tmc2130.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/tmc2130.py b/klippy/extras/tmc2130.py index acb1ca51..0374a747 100644 --- a/klippy/extras/tmc2130.py +++ b/klippy/extras/tmc2130.py @@ -129,7 +129,7 @@ def get_config_stealthchop(config, tmc_freq): velocity = config.getfloat('stealthchop_threshold', 0., minval=0.) if not velocity: return mres, False, 0 - stepper_name = config.get_name().split()[1] + stepper_name = " ".join(config.get_name().split()[1:]) stepper_config = config.getsection(stepper_name) step_dist = stepper_config.getfloat('step_distance') step_dist_256 = step_dist / (1 << mres) @@ -144,7 +144,7 @@ def get_config_stealthchop(config, tmc_freq): class TMC2130: def __init__(self, config): self.printer = config.get_printer() - self.name = config.get_name().split()[1] + self.name = config.get_name().split()[-1] self.spi = bus.MCU_SPI_from_config(config, 3, default_speed=4000000) # Allow virtual endstop to be created self.diag1_pin = config.get('diag1_pin', None) |