aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-02-23 12:00:08 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-02-23 12:00:08 -0500
commita8742e982d899e75f9ffcd3992878b401223ed9e (patch)
tree50b4e02657b61471ac8acd922e5d9a7e0f4266be /klippy/extras/tmc.py
parent4d2adddb202321cd4f65e41b9ffe6fac5d1fe566 (diff)
downloadkutter-a8742e982d899e75f9ffcd3992878b401223ed9e.tar.gz
kutter-a8742e982d899e75f9ffcd3992878b401223ed9e.tar.xz
kutter-a8742e982d899e75f9ffcd3992878b401223ed9e.zip
tmc: Improve error message on missing microsteps config
If microsteps is missing, warn about it in the stepper config section, not the tmc config section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/tmc.py')
-rw-r--r--klippy/extras/tmc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/extras/tmc.py b/klippy/extras/tmc.py
index 4d3296aa..fbd9f584 100644
--- a/klippy/extras/tmc.py
+++ b/klippy/extras/tmc.py
@@ -266,7 +266,8 @@ class TMCMicrostepHelper:
self.fields = mcu_tmc.get_fields()
stepper_name = " ".join(config.get_name().split()[1:])
stepper_config = ms_config = config.getsection(stepper_name)
- if stepper_config.get('microsteps', None, note_valid=False) is None:
+ 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
steps = {'256': 0, '128': 1, '64': 2, '32': 3, '16': 4,