diff options
author | Alex Voinea <voinea.dragos.alexandru@gmail.com> | 2024-05-13 22:31:39 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-05-14 13:26:58 -0400 |
commit | f01c8853ca5c4f7d89ea1ae9a33779fe9c0446b1 (patch) | |
tree | 7ea0bc1c209d2800576c65405b6959117b0cfa55 /klippy/extras/tmc.py | |
parent | 472d8e5b669de075d6d94b461b5f08d5901d3bda (diff) | |
download | kutter-f01c8853ca5c4f7d89ea1ae9a33779fe9c0446b1.tar.gz kutter-f01c8853ca5c4f7d89ea1ae9a33779fe9c0446b1.tar.xz kutter-f01c8853ca5c4f7d89ea1ae9a33779fe9c0446b1.zip |
tmc: Do not pass the frequency directly to the helpers
Use the new get_tmc_frequency() instead.
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
Diffstat (limited to 'klippy/extras/tmc.py')
-rw-r--r-- | klippy/extras/tmc.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/extras/tmc.py b/klippy/extras/tmc.py index 8143882a..4ce9466a 100644 --- a/klippy/extras/tmc.py +++ b/klippy/extras/tmc.py @@ -592,7 +592,7 @@ def TMCtstepHelper(step_dist, mres, tmc_freq, velocity): return 0xfffff # Helper to configure stealthChop-spreadCycle transition velocity -def TMCStealthchopHelper(config, mcu_tmc, tmc_freq): +def TMCStealthchopHelper(config, mcu_tmc): fields = mcu_tmc.get_fields() en_pwm_mode = False velocity = config.getfloat('stealthchop_threshold', None, minval=0.) @@ -606,7 +606,8 @@ def TMCStealthchopHelper(config, mcu_tmc, tmc_freq): rotation_dist, steps_per_rotation = stepper.parse_step_distance(sconfig) step_dist = rotation_dist / steps_per_rotation mres = fields.get_field("mres") - tpwmthrs = TMCtstepHelper(step_dist, mres, tmc_freq, velocity) + tpwmthrs = TMCtstepHelper(step_dist, mres, mcu_tmc.get_tmc_frequency(), + velocity) fields.set_field("tpwmthrs", tpwmthrs) reg = fields.lookup_register("en_pwm_mode", None) |