mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-11-02 19:36:04 +01:00
delta: Rename get_position() to calc_position()
Calculating the cartesian position from the stepper positions can be complex and cpu intensive, so rename it to calc_position() to be more descriptive. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -51,7 +51,7 @@ class CartKinematics:
|
||||
if flags == "Z":
|
||||
return [self.rails[2]]
|
||||
return list(self.rails)
|
||||
def get_position(self):
|
||||
def calc_position(self):
|
||||
return [rail.get_commanded_position() for rail in self.rails]
|
||||
def set_position(self, newpos, homing_axes):
|
||||
for i in StepList:
|
||||
@@ -161,7 +161,7 @@ class CartKinematics:
|
||||
dc_axis = self.dual_carriage_axis
|
||||
self.rails[dc_axis] = dc_rail
|
||||
extruder_pos = toolhead.get_position()[3]
|
||||
toolhead.set_position(self.get_position() + [extruder_pos])
|
||||
toolhead.set_position(self.calc_position() + [extruder_pos])
|
||||
if self.limits[dc_axis][0] <= self.limits[dc_axis][1]:
|
||||
self.limits[dc_axis] = dc_rail.get_range()
|
||||
self.need_motor_enable = True
|
||||
|
||||
Reference in New Issue
Block a user