safe_z_home: Fix issue where 'home_xy_position: 0,0' did not position at 0,0

If '[stepper_x]' and/or '[stepper_y]' have a 'position_min' that is
non-zero, and '[safe_z_home] home_xy_position' is '0,0'; then the 'G28'
command will _not_ move to '0,0'; but stay at 'position_min' during the
Z endstop test.

This fix corrects this issue.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
This commit is contained in:
Jason S. McMullan 2019-09-28 19:27:17 -04:00 committed by KevinOConnor
parent 004edb9613
commit 7605244fa0
1 changed files with 2 additions and 4 deletions

View File

@ -70,9 +70,7 @@ class SafeZHoming:
pos = toolhead.get_position()
prev_x = pos[0]
prev_y = pos[1]
if self.home_x_pos:
pos[0] = self.home_x_pos
if self.home_y_pos:
pos[1] = self.home_y_pos
toolhead.move(pos, self.speed)
self.gcode.reset_last_position()