diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-09-09 14:45:10 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-09 14:45:10 -0400 |
commit | bf85c61b4874a48929788c2e8030f1e59b71992c (patch) | |
tree | 75df5b76c6e5170ef4f87e48d8c657babc2a27ab /klippy/corexy.py | |
parent | dba488f30a10f0df1798d7e5c6b8d028d371b6ba (diff) | |
download | kutter-bf85c61b4874a48929788c2e8030f1e59b71992c.tar.gz kutter-bf85c61b4874a48929788c2e8030f1e59b71992c.tar.xz kutter-bf85c61b4874a48929788c2e8030f1e59b71992c.zip |
corexy: Fix max_xy_halt_velocity calculation on corexy
On corexy, the stepper velocity of a diagonal move could be greater
than the maximum printer velocity. Account for that when setting the
maximum xy halt velocity in the mcu stepper config.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/corexy.py')
-rw-r--r-- | klippy/corexy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/corexy.py b/klippy/corexy.py index b22a8dac..0bbbf910 100644 --- a/klippy/corexy.py +++ b/klippy/corexy.py @@ -3,7 +3,7 @@ # Copyright (C) 2017 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. -import logging +import logging, math import stepper, homing StepList = (0, 1, 2) @@ -24,6 +24,7 @@ class CoreXYKinematics: self.limits = [(1.0, -1.0)] * 3 # Setup stepper max halt velocity max_xy_halt_velocity = toolhead.get_max_axis_halt(max_accel) + max_xy_halt_velocity *= math.sqrt(2.) self.steppers[0].set_max_jerk(max_xy_halt_velocity, max_accel) self.steppers[1].set_max_jerk(max_xy_halt_velocity, max_accel) max_z_halt_velocity = toolhead.get_max_axis_halt(self.max_z_accel) |