homing: Implement second home from homing.py

Move the logic for performing the second home from the kinematics
classes to the generic homing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-10-08 21:49:56 -04:00
parent 3db483e270
commit d4bf51231a
5 changed files with 75 additions and 102 deletions

View file

@ -50,8 +50,10 @@ class PrinterProbe:
homing_state = homing.Homing(toolhead)
pos = toolhead.get_position()
pos[2] = self.z_position
endstops = [(self.mcu_probe, "probe")]
try:
homing_state.probing_move(pos, self.mcu_probe, self.speed)
homing_state.homing_move(pos, endstops, self.speed,
probe_pos=True, verify_movement=True)
except homing.EndstopError as e:
reason = str(e)
if "Timeout during endstop homing" in reason: