diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 00:48:01 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 01:16:11 -0400 |
commit | cc7c99a4a415fb3c4fa8ef947d12098c13b40d12 (patch) | |
tree | 98ad1151403be1572eef832379138f2c0c4f8267 /klippy/toolhead.py | |
parent | d3eb148cfa411bd8e22f06f190ffda4b2cca5a06 (diff) | |
download | kutter-cc7c99a4a415fb3c4fa8ef947d12098c13b40d12.tar.gz kutter-cc7c99a4a415fb3c4fa8ef947d12098c13b40d12.tar.xz kutter-cc7c99a4a415fb3c4fa8ef947d12098c13b40d12.zip |
cartesian: Fix min_stop_interval calculation error
It is possible to have an acceleration greater than max_z_accel on
XY+Z moves. That needs to be taken into account when calculating the
min_stop_interval. This prevents spurious "No next step" MCU errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r-- | klippy/toolhead.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 6ed6099e..6df5e17f 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -381,11 +381,12 @@ class ToolHead: logging.exception("Exception in force_shutdown") def get_max_velocity(self): return self.max_velocity, self.max_accel - def get_max_axis_halt(self, max_accel): + def get_max_axis_halt(self): # Determine the maximum velocity a cartesian axis could halt # at due to the junction_deviation setting. The 8.0 was # determined experimentally. - return math.sqrt(8. * self.junction_deviation * max_accel) + return min(self.max_velocity, + math.sqrt(8. * self.junction_deviation * self.max_accel)) def add_printer_objects(printer, config): printer.add_object('toolhead', ToolHead(printer, config)) |