mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-10 00:07:54 -06:00
kinematics: report all axis limits (min/max)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
parent
a5ebe5825a
commit
e68cf08d15
9 changed files with 81 additions and 15 deletions
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, math
|
||||
import stepper
|
||||
import stepper, homing
|
||||
|
||||
class CoreXYKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
|
@ -95,7 +95,15 @@ class CoreXYKinematics:
|
|||
self.max_z_velocity * z_ratio, self.max_z_accel * z_ratio)
|
||||
def get_status(self, eventtime):
|
||||
axes = [a for a, (l, h) in zip("xyz", self.limits) if l <= h]
|
||||
return {'homed_axes': "".join(axes)}
|
||||
axes_min = [0.0, 0.0, 0.0, 0.0]
|
||||
axes_max = [0.0, 0.0, 0.0, 0.0]
|
||||
for pos, rail in enumerate(self.rails):
|
||||
axes_min[pos], axes_max[pos] = rail.get_range()
|
||||
return {
|
||||
'homed_axes': "".join(axes),
|
||||
'axis_minimum': homing.Coord(*axes_min),
|
||||
'axis_maximum': homing.Coord(*axes_max)
|
||||
}
|
||||
|
||||
def load_kinematics(toolhead, config):
|
||||
return CoreXYKinematics(toolhead, config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue