stepper: Return homing offset in steps instead of an absolute position
Rename get_homed_position() to get_homed_offset() and return the endstop position delta in steps instead of an absolute position relative to position_endstop. The conversion to absolute positions can be dependent on the type of kinematics in use, so is inappropriate to do in the low level stepper.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -28,7 +28,8 @@ class CartKinematics:
|
||||
max_xy_accel = min(s.max_accel for s in self.steppers[:2])
|
||||
return max_xy_speed, max_xy_accel
|
||||
def get_homed_position(self):
|
||||
return [s.get_homed_position() for s in self.steppers]
|
||||
return [s.position_endstop + s.get_homed_offset()*s.step_dist
|
||||
for s in self.steppers]
|
||||
def home(self, toolhead, axes):
|
||||
# Each axis is homed independently and in order
|
||||
homing_state = homing.Homing(toolhead, axes)
|
||||
|
||||
Reference in New Issue
Block a user