diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-04-25 14:53:50 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-04-30 11:09:08 -0400 |
commit | 5a5ecd88e22a25ef9ec5336f3d3220af042678be (patch) | |
tree | 14c7779643433627acfca2797eba4f45f65c975e /klippy/kinematics | |
parent | d1946fb6ed672d549f79a09d531de11c1463ed22 (diff) | |
download | kutter-5a5ecd88e22a25ef9ec5336f3d3220af042678be.tar.gz kutter-5a5ecd88e22a25ef9ec5336f3d3220af042678be.tar.xz kutter-5a5ecd88e22a25ef9ec5336f3d3220af042678be.zip |
stepper: Do not set min_stop_interval in micro-controller
The min_stop_interval safety check is fragile and leads to a notable
amount of complexity. Avoid these issues by not programming this
safety check.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics')
-rw-r--r-- | klippy/kinematics/cartesian.py | 7 | ||||
-rw-r--r-- | klippy/kinematics/corexy.py | 8 | ||||
-rw-r--r-- | klippy/kinematics/corexz.py | 7 | ||||
-rw-r--r-- | klippy/kinematics/delta.py | 6 | ||||
-rw-r--r-- | klippy/kinematics/extruder.py | 1 | ||||
-rw-r--r-- | klippy/kinematics/polar.py | 5 | ||||
-rw-r--r-- | klippy/kinematics/rotary_delta.py | 5 | ||||
-rw-r--r-- | klippy/kinematics/winch.py | 5 |
8 files changed, 2 insertions, 42 deletions
diff --git a/klippy/kinematics/cartesian.py b/klippy/kinematics/cartesian.py index c2ca350a..e2c21900 100644 --- a/klippy/kinematics/cartesian.py +++ b/klippy/kinematics/cartesian.py @@ -31,12 +31,6 @@ class CartKinematics: ranges = [r.get_range() for r in self.rails] self.axes_min = toolhead.Coord(*[r[0] for r in ranges], e=0.) self.axes_max = toolhead.Coord(*[r[1] for r in ranges], e=0.) - # Setup stepper max halt velocity - max_halt_velocity = toolhead.get_max_axis_halt() - self.rails[0].set_max_jerk(max_halt_velocity, max_accel) - self.rails[1].set_max_jerk(max_halt_velocity, max_accel) - self.rails[2].set_max_jerk(min(max_halt_velocity, self.max_z_velocity), - max_accel) # Check for dual carriage support if config.has_section('dual_carriage'): dc_config = config.getsection('dual_carriage') @@ -46,7 +40,6 @@ class CartKinematics: dc_rail.setup_itersolve('cartesian_stepper_alloc', dc_axis) for s in dc_rail.get_steppers(): toolhead.register_step_generator(s.generate_steps) - dc_rail.set_max_jerk(max_halt_velocity, max_accel) self.dual_carriage_rails = [ self.rails[self.dual_carriage_axis], dc_rail] self.printer.lookup_object('gcode').register_command( diff --git a/klippy/kinematics/corexy.py b/klippy/kinematics/corexy.py index 726ba3c6..451a88aa 100644 --- a/klippy/kinematics/corexy.py +++ b/klippy/kinematics/corexy.py @@ -34,14 +34,6 @@ class CoreXYKinematics: ranges = [r.get_range() for r in self.rails] self.axes_min = toolhead.Coord(*[r[0] for r in ranges], e=0.) self.axes_max = toolhead.Coord(*[r[1] for r in ranges], e=0.) - # Setup stepper max halt velocity - max_halt_velocity = toolhead.get_max_axis_halt() - max_xy_halt_velocity = max_halt_velocity * math.sqrt(2.) - max_xy_accel = max_accel * math.sqrt(2.) - self.rails[0].set_max_jerk(max_xy_halt_velocity, max_xy_accel) - self.rails[1].set_max_jerk(max_xy_halt_velocity, max_xy_accel) - self.rails[2].set_max_jerk( - min(max_halt_velocity, self.max_z_velocity), self.max_z_accel) def get_steppers(self): return [s for rail in self.rails for s in rail.get_steppers()] def calc_tag_position(self): diff --git a/klippy/kinematics/corexz.py b/klippy/kinematics/corexz.py index 2543977b..698e4c08 100644 --- a/klippy/kinematics/corexz.py +++ b/klippy/kinematics/corexz.py @@ -34,13 +34,6 @@ class CoreXZKinematics: ranges = [r.get_range() for r in self.rails] self.axes_min = toolhead.Coord(*[r[0] for r in ranges], e=0.) self.axes_max = toolhead.Coord(*[r[1] for r in ranges], e=0.) - # Setup stepper max halt velocity - max_halt_velocity = toolhead.get_max_axis_halt() - max_xy_halt_velocity = max_halt_velocity * math.sqrt(2.) - max_xy_accel = max_accel * math.sqrt(2.) - self.rails[0].set_max_jerk(max_xy_halt_velocity, max_xy_accel) - self.rails[1].set_max_jerk(max_xy_halt_velocity, max_xy_accel) - self.rails[2].set_max_jerk(max_xy_halt_velocity, max_xy_accel) def get_steppers(self): return [s for rail in self.rails for s in rail.get_steppers()] def calc_tag_position(self): diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py index 44331a91..0d17ed19 100644 --- a/klippy/kinematics/delta.py +++ b/klippy/kinematics/delta.py @@ -25,15 +25,11 @@ class DeltaKinematics: self.rails = [rail_a, rail_b, rail_c] config.get_printer().register_event_handler("stepper_enable:motor_off", self._motor_off) - # Setup stepper max halt velocity + # Setup max velocity self.max_velocity, self.max_accel = toolhead.get_max_velocity() self.max_z_velocity = config.getfloat( 'max_z_velocity', self.max_velocity, above=0., maxval=self.max_velocity) - max_halt_velocity = toolhead.get_max_axis_halt() * SLOW_RATIO - max_halt_accel = self.max_accel * SLOW_RATIO - for rail in self.rails: - rail.set_max_jerk(max_halt_velocity, max_halt_accel) # Read radius and arm lengths self.radius = radius = config.getfloat('delta_radius', above=0.) print_radius = config.getfloat('print_radius', radius, above=0.) diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py index 71f7b382..ea5161a9 100644 --- a/klippy/kinematics/extruder.py +++ b/klippy/kinematics/extruder.py @@ -36,7 +36,6 @@ class PrinterExtruder: self.max_e_accel = config.getfloat( 'max_extrude_only_accel', max_accel * def_max_extrude_ratio , above=0.) - self.stepper.set_max_jerk(9999999.9, 9999999.9) self.max_e_dist = config.getfloat( 'max_extrude_only_distance', 50., minval=0.) self.instant_corner_v = config.getfloat( diff --git a/klippy/kinematics/polar.py b/klippy/kinematics/polar.py index 98b7c7e1..baa3a11c 100644 --- a/klippy/kinematics/polar.py +++ b/klippy/kinematics/polar.py @@ -36,11 +36,6 @@ class PolarKinematics: min_z, max_z = self.rails[1].get_range() self.axes_min = toolhead.Coord(-max_xy, -max_xy, min_z, 0.) self.axes_max = toolhead.Coord(max_xy, max_xy, max_z, 0.) - # Setup stepper max halt velocity - max_halt_velocity = toolhead.get_max_axis_halt() - stepper_bed.set_max_jerk(max_halt_velocity, max_accel) - rail_arm.set_max_jerk(max_halt_velocity, max_accel) - rail_z.set_max_jerk(max_halt_velocity, max_accel) def get_steppers(self): return list(self.steppers) def calc_tag_position(self): diff --git a/klippy/kinematics/rotary_delta.py b/klippy/kinematics/rotary_delta.py index 9e57a11e..f61ed34a 100644 --- a/klippy/kinematics/rotary_delta.py +++ b/klippy/kinematics/rotary_delta.py @@ -23,13 +23,10 @@ class RotaryDeltaKinematics: self.rails = [rail_a, rail_b, rail_c] config.get_printer().register_event_handler("stepper_enable:motor_off", self._motor_off) - # Setup stepper max halt velocity + # Read config max_velocity, max_accel = toolhead.get_max_velocity() self.max_z_velocity = config.getfloat('max_z_velocity', max_velocity, above=0., maxval=max_velocity) - for rail in self.rails: - rail.set_max_jerk(9999999.9, 9999999.9) - # Read config shoulder_radius = config.getfloat('shoulder_radius', above=0.) shoulder_height = config.getfloat('shoulder_height', above=0.) a_upper_arm = stepper_configs[0].getfloat('upper_arm_length', above=0.) diff --git a/klippy/kinematics/winch.py b/klippy/kinematics/winch.py index 942c0545..58737b58 100644 --- a/klippy/kinematics/winch.py +++ b/klippy/kinematics/winch.py @@ -22,11 +22,6 @@ class WinchKinematics: s.setup_itersolve('winch_stepper_alloc', *a) s.set_trapq(toolhead.get_trapq()) toolhead.register_step_generator(s.generate_steps) - # Setup stepper max halt velocity - max_velocity, max_accel = toolhead.get_max_velocity() - max_halt_velocity = toolhead.get_max_axis_halt() - for s in self.steppers: - s.set_max_jerk(max_halt_velocity, max_accel) # Setup boundary checks acoords = list(zip(*self.anchors)) self.axes_min = toolhead.Coord(*[min(a) for a in acoords], e=0.) |