mirror of
git://soft.sys114.com/klipper
synced 2026-02-11 12:00:26 +09:00
toolhead: Report which axes are homed via get_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -116,10 +116,9 @@ class CartKinematics:
|
||||
z_ratio = move.move_d / abs(move.axes_d[2])
|
||||
move.limit_speed(
|
||||
self.max_z_velocity * z_ratio, self.max_z_accel * z_ratio)
|
||||
def get_status(self):
|
||||
return {'homed_axes': "".join([a
|
||||
for a, (l, h) in zip("XYZ", self.limits) if l <= h])
|
||||
}
|
||||
def get_status(self, eventtime):
|
||||
axes = [a for a, (l, h) in zip("xyz", self.limits) if l <= h]
|
||||
return { 'homed_axes': "".join(axes) }
|
||||
# Dual carriage support
|
||||
def _activate_carriage(self, carriage):
|
||||
toolhead = self.printer.lookup_object('toolhead')
|
||||
|
||||
@@ -93,10 +93,9 @@ class CoreXYKinematics:
|
||||
z_ratio = move.move_d / abs(move.axes_d[2])
|
||||
move.limit_speed(
|
||||
self.max_z_velocity * z_ratio, self.max_z_accel * z_ratio)
|
||||
def get_status(self):
|
||||
return {'homed_axes': "".join([a
|
||||
for a, (l, h) in zip("XYZ", self.limits) if l <= h])
|
||||
}
|
||||
def get_status(self, eventtime):
|
||||
axes = [a for a, (l, h) in zip("xyz", self.limits) if l <= h]
|
||||
return {'homed_axes': "".join(axes)}
|
||||
|
||||
def load_kinematics(toolhead, config):
|
||||
return CoreXYKinematics(toolhead, config)
|
||||
|
||||
@@ -144,8 +144,8 @@ class DeltaKinematics:
|
||||
move.limit_speed(max_velocity * r, self.max_accel * r)
|
||||
limit_xy2 = -1.
|
||||
self.limit_xy2 = min(limit_xy2, self.slow_xy2)
|
||||
def get_status(self):
|
||||
return {'homed_axes': '' if self.need_home else 'XYZ'}
|
||||
def get_status(self, eventtime):
|
||||
return {'homed_axes': '' if self.need_home else 'xyz'}
|
||||
|
||||
# Helper function for DELTA_CALIBRATE script
|
||||
def get_calibrate_params(self):
|
||||
|
||||
@@ -17,7 +17,7 @@ class NoneKinematics:
|
||||
pass
|
||||
def check_move(self, move):
|
||||
pass
|
||||
def get_status(self):
|
||||
def get_status(self, eventtime):
|
||||
return {'homed_axes': ''}
|
||||
|
||||
def load_kinematics(toolhead, config):
|
||||
|
||||
@@ -104,9 +104,10 @@ class PolarKinematics:
|
||||
z_ratio = move.move_d / abs(move.axes_d[2])
|
||||
move.limit_speed(
|
||||
self.max_z_velocity * z_ratio, self.max_z_accel * z_ratio)
|
||||
def get_status(self):
|
||||
return {'homed_axes': (("XY" if self.limit_xy2 >= 0. else "") +
|
||||
("Z" if self.limit_z[0] <= self.limit_z[1] else ""))}
|
||||
def get_status(self, eventtime):
|
||||
xy_home = "xy" if self.limit_xy2 >= 0. else ""
|
||||
z_home = "z" if self.limit_z[0] <= self.limit_z[1] else ""
|
||||
return {'homed_axes': xy_home + z_home}
|
||||
|
||||
def load_kinematics(toolhead, config):
|
||||
return PolarKinematics(toolhead, config)
|
||||
|
||||
@@ -45,9 +45,9 @@ class WinchKinematics:
|
||||
def check_move(self, move):
|
||||
# XXX - boundary checks and speed limits not implemented
|
||||
pass
|
||||
def get_status(self):
|
||||
def get_status(self, eventtime):
|
||||
# XXX - homed_checks and rail limits not implemented
|
||||
return {'homed_axes': 'XYZ'}
|
||||
return {'homed_axes': 'xyz'}
|
||||
|
||||
def load_kinematics(toolhead, config):
|
||||
return WinchKinematics(toolhead, config)
|
||||
|
||||
Reference in New Issue
Block a user