mirror of https://github.com/Desuuuu/klipper.git
homing: Ability to set retract speed between homing moves (#2487)
On the retract move between homing moves, use a different speed (typically a faster one). Signed-off-by: Mike Stiemke <fandjango@gmx.de>
This commit is contained in:
parent
cb042e749d
commit
4d9a36b34f
|
@ -55,6 +55,10 @@ position_max: 200
|
|||
# Distance to backoff (in mm) before homing a second time during
|
||||
# homing. Set this to zero to disable the second home. The default
|
||||
# is 5mm.
|
||||
#homing_retract_speed:
|
||||
# Speed to use on the retract move after homing in case this should
|
||||
# be different from the homing speed, which is the default for this
|
||||
# parameter
|
||||
#second_homing_speed:
|
||||
# Velocity (in mm/s) of the stepper when performing the second home.
|
||||
# The default is homing_speed/2.
|
||||
|
|
|
@ -130,7 +130,7 @@ class Homing:
|
|||
retract_r = min(1., hi.retract_dist / move_d)
|
||||
retractpos = [mp - ad * retract_r
|
||||
for mp, ad in zip(movepos, axes_d)]
|
||||
self.toolhead.move(retractpos, hi.speed)
|
||||
self.toolhead.move(retractpos, hi.retract_speed)
|
||||
# Home again
|
||||
forcepos = [rp - ad * retract_r
|
||||
for rp, ad in zip(retractpos, axes_d)]
|
||||
|
|
|
@ -236,6 +236,8 @@ class PrinterRail:
|
|||
self.homing_speed = config.getfloat('homing_speed', 5.0, above=0.)
|
||||
self.second_homing_speed = config.getfloat(
|
||||
'second_homing_speed', self.homing_speed/2., above=0.)
|
||||
self.homing_retract_speed = config.getfloat(
|
||||
'homing_retract_speed', self.homing_speed, above=0.)
|
||||
self.homing_retract_dist = config.getfloat(
|
||||
'homing_retract_dist', 5., minval=0.)
|
||||
self.homing_positive_dir = config.getboolean(
|
||||
|
@ -254,11 +256,11 @@ class PrinterRail:
|
|||
return self.position_min, self.position_max
|
||||
def get_homing_info(self):
|
||||
homing_info = collections.namedtuple('homing_info', [
|
||||
'speed', 'position_endstop', 'retract_dist', 'positive_dir',
|
||||
'second_homing_speed'])(
|
||||
'speed', 'position_endstop', 'retract_speed', 'retract_dist',
|
||||
'positive_dir', 'second_homing_speed'])(
|
||||
self.homing_speed, self.position_endstop,
|
||||
self.homing_retract_dist, self.homing_positive_dir,
|
||||
self.second_homing_speed)
|
||||
self.homing_retract_speed, self.homing_retract_dist,
|
||||
self.homing_positive_dir, self.second_homing_speed)
|
||||
return homing_info
|
||||
def get_steppers(self):
|
||||
return list(self.steppers)
|
||||
|
|
Loading…
Reference in New Issue