idex_modes: Bugfix for kinematic position calculation.
idex_mode would swap the X and dual-carriage rail in some cases (homing), but not in others. As such, the position calculation was correct while homing, but incorrect for the second carriage during normal moves. This commit fixes homing to work without swapped rails, removes the swapping of rails while homing, and removes the ability to swap rails (as it is now no longer used). Fix has been tested in a Hybrid_CoreXY IDEX printer (Voron Double Dragon). Hybrid_CoreXZ has identical changes and is similar enough that I am confident it will work as intended. Changes to cartesion seem simple enough, but would benefit from someone running a couple of tests. Signed-off-by: Frans-Willem Hardijzer <fw@hardijzer.nl>
This commit is contained in:
committed by
KevinOConnor
parent
694d38c791
commit
b7f7b8a346
@@ -57,7 +57,7 @@ class HybridCoreXZKinematics:
|
||||
pos = [stepper_positions[rail.get_name()] for rail in self.rails]
|
||||
if (self.dc_module is not None and 'PRIMARY' == \
|
||||
self.dc_module.get_status()['carriage_1']):
|
||||
return [pos[0] - pos[2], pos[1], pos[2]]
|
||||
return [pos[3] - pos[2], pos[1], pos[2]]
|
||||
else:
|
||||
return [pos[0] + pos[2], pos[1], pos[2]]
|
||||
def update_limits(self, i, range):
|
||||
@@ -66,13 +66,15 @@ class HybridCoreXZKinematics:
|
||||
# otherwise leave in un-homed state.
|
||||
if l <= h:
|
||||
self.limits[i] = range
|
||||
def override_rail(self, i, rail):
|
||||
self.rails[i] = rail
|
||||
def set_position(self, newpos, homing_axes):
|
||||
for i, rail in enumerate(self.rails):
|
||||
rail.set_position(newpos)
|
||||
if i in homing_axes:
|
||||
self.limits[i] = rail.get_range()
|
||||
for axis in homing_axes:
|
||||
if self.dc_module and axis == self.dc_module.axis:
|
||||
rail = self.dc_module.get_primary_rail().get_rail()
|
||||
else:
|
||||
rail = self.rails[axis]
|
||||
self.limits[axis] = rail.get_range()
|
||||
def note_z_not_homed(self):
|
||||
# Helper for Safe Z Home
|
||||
self.limits[2] = (1.0, -1.0)
|
||||
|
||||
Reference in New Issue
Block a user