diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-05-16 12:23:48 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-05-16 12:29:52 -0400 |
commit | 5d52b32e645d71f8e6b8b5426f89fe61eaf92e56 (patch) | |
tree | c918ada1c67010050ac770f89abfccbcd841a6c5 /klippy/extras/tmc.py | |
parent | 2efde0111e949c87f72409fbe43a6a96d5aa07f5 (diff) | |
download | kutter-5d52b32e645d71f8e6b8b5426f89fe61eaf92e56.tar.gz kutter-5d52b32e645d71f8e6b8b5426f89fe61eaf92e56.tar.xz kutter-5d52b32e645d71f8e6b8b5426f89fe61eaf92e56.zip |
tmc: Remove code that could read microsteps in tmc config sections
Setting of microsteps in the stepper config section has been required
since commit eea0137b. Remove the no longer needed compatibility
code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/tmc.py')
-rw-r--r-- | klippy/extras/tmc.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/klippy/extras/tmc.py b/klippy/extras/tmc.py index a797b866..1d8599e2 100644 --- a/klippy/extras/tmc.py +++ b/klippy/extras/tmc.py @@ -577,7 +577,7 @@ def TMCWaveTableHelper(config, mcu_tmc): set_config_field(config, "start_sin", 0) set_config_field(config, "start_sin90", 247) -# Helper to configure and query the microstep settings +# Helper to configure the microstep settings def TMCMicrostepHelper(config, mcu_tmc): fields = mcu_tmc.get_fields() stepper_name = " ".join(config.get_name().split()[1:]) @@ -585,13 +585,9 @@ def TMCMicrostepHelper(config, mcu_tmc): raise config.error( "Could not find config section '[%s]' required by tmc driver" % (stepper_name,)) - stepper_config = ms_config = config.getsection(stepper_name) - if (stepper_config.get('microsteps', None, note_valid=False) is None - and config.get('microsteps', None, note_valid=False) is not None): - # Older config format with microsteps in tmc config section - ms_config = config + sconfig = config.getsection(stepper_name) steps = {256: 0, 128: 1, 64: 2, 32: 3, 16: 4, 8: 5, 4: 6, 2: 7, 1: 8} - mres = ms_config.getchoice('microsteps', steps) + mres = sconfig.getchoice('microsteps', steps) fields.set_field("mres", mres) fields.set_field("intpol", config.getboolean("interpolate", True)) |