From 09234502865f9489a72852ba7111da80eb285674 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 13 Dec 2020 10:29:32 -0500 Subject: [PATCH] tmc: Use configfile note_valid=False when inspecting stepper step_distance Signed-off-by: Kevin O'Connor --- klippy/extras/tmc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/extras/tmc.py b/klippy/extras/tmc.py index acc0b607..7b9280dd 100644 --- a/klippy/extras/tmc.py +++ b/klippy/extras/tmc.py @@ -287,7 +287,7 @@ def TMCStealthchopHelper(config, mcu_tmc, tmc_freq): if velocity: stepper_name = " ".join(config.get_name().split()[1:]) stepper_config = config.getsection(stepper_name) - step_dist = stepper_config.getfloat('step_distance') + step_dist = stepper_config.getfloat('step_distance', note_valid=False) step_dist_256 = step_dist / (1 << fields.get_field("MRES")) threshold = int(tmc_freq * step_dist_256 / velocity + .5) fields.set_field("TPWMTHRS", max(0, min(0xfffff, threshold)))