toolhead: Increase maximum stepper halt velocity
Do a better job of calculating the maximum halt velocity for the stepper motors. The maximum cornering velocity is related to both the maximum acceleration and the junction_deviation, so both should be in the formula. Tests show that "math.sqrt(8. * self.junction_deviation * self.max_accel)" very closely fits the maximum on cartesian robots. This fixes potential "no next step" shutdowns that could occur on some print moves. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
acb0b8f599
commit
0ca96e543c
|
@ -198,7 +198,9 @@ class ToolHead:
|
||||||
self.motor_off_time = self.reactor.NEVER
|
self.motor_off_time = self.reactor.NEVER
|
||||||
self.flush_timer = self.reactor.register_timer(self._flush_handler)
|
self.flush_timer = self.reactor.register_timer(self._flush_handler)
|
||||||
def build_config(self):
|
def build_config(self):
|
||||||
xy_halt = 0.005 * self.max_accel # XXX
|
# Determine the maximum velocity a cartesian axis could have
|
||||||
|
# before cornering. The 8. was determined experimentally.
|
||||||
|
xy_halt = math.sqrt(8. * self.junction_deviation * self.max_accel)
|
||||||
self.kin.set_max_jerk(xy_halt, self.max_speed, self.max_accel)
|
self.kin.set_max_jerk(xy_halt, self.max_speed, self.max_accel)
|
||||||
self.extruder.set_max_jerk(xy_halt, self.max_speed, self.max_accel)
|
self.extruder.set_max_jerk(xy_halt, self.max_speed, self.max_accel)
|
||||||
self.kin.build_config()
|
self.kin.build_config()
|
||||||
|
|
Loading…
Reference in New Issue