toolhead: Report which axes are homed via get_status()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-11-24 19:16:21 -05:00
parent 282af0220e
commit 3683273936
9 changed files with 28 additions and 24 deletions

View file

@ -30,14 +30,14 @@ class SafeZHoming:
def cmd_G28(self, params):
toolhead = self.printer.lookup_object('toolhead')
kinematics = toolhead.get_kinematics()
# Perform Z Hop if necessary
if self.z_hop != 0.0:
pos = toolhead.get_position()
kin_status = kinematics.get_status()
curtime = self.printer.get_reactor().monotonic()
kin_status = toolhead.get_kinematics().get_status(curtime)
# Check if Z axis is homed or has a known position
if 'Z' in kin_status['homed_axes']:
if 'z' in kin_status['homed_axes']:
# Check if the zhop would exceed the printer limits
if pos[2] + self.z_hop > self.max_z:
self.gcode.respond_info(