homing: allow to disable homing retract

Homing retract can be disabled by setting homing_retract_dist to 0.

Signed-off-by: Petri Honkala <cruwaller@gmail.com>
This commit is contained in:
cruwaller
2018-03-06 08:59:13 +02:00
committed by Kevin O'Connor
parent 5a16863465
commit 923954772f
2 changed files with 3 additions and 1 deletions

View File

@@ -77,6 +77,8 @@ class Homing:
if error is not None:
raise EndstopError(error)
def home(self, forcepos, movepos, endstops, speed, second_home=False):
if second_home and forcepos == movepos:
return
# Alter kinematics class to think printer is at forcepos
homing_axes = [axis for axis in range(3) if forcepos[axis] is not None]
self.toolhead.set_position(