hybrid_corexy: Fix changing dual-carriage carriage will inadvertently set axis to homed, even if it wasn't. (#6183)

In hybrid_corexy and hybrid_corexz, the update_limits function is (only) called by the DualCarriage implementation, whenever the carriage changes.
Unfortunately, these limits also keep track of homing status, when they're unhomed they are set to 1 to -1 (invalid range).
As a fix, if the limit was set to "unhomed", we keep it that way, and only update it with the new rail limits if it was already properly homed before.

Signed-off-by: Frans-willem Hardijzer <fw@hardijzer.nl>
This commit is contained in:
Frans-Willem Hardijzer 2023-05-25 17:55:07 +02:00 committed by GitHub
parent 37315bf336
commit ec61f10f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -66,7 +66,11 @@ class HybridCoreXYKinematics:
else:
return [pos[0] + pos[1], pos[1], pos[2]]
def update_limits(self, i, range):
self.limits[i] = range
l, h = self.limits[i]
# Only update limits if this axis was already homed,
# 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):

View File

@ -66,7 +66,11 @@ class HybridCoreXZKinematics:
else:
return [pos[0] + pos[2], pos[1], pos[2]]
def update_limits(self, i, range):
self.limits[i] = range
l, h = self.limits[i]
# Only update limits if this axis was already homed,
# 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):