fix(omny): widen misleading "position not free"/"no sample available" errors
CI for csaxs_bec / test (push) Successful in 3m6s

Both _otransfer_check_free_slot_available_at_position() and
_otransfer_check_sample_available_at_position() distinguish "slot
occupied/empty" from "no shuttle parked at the active parking
position" internally (via print()), but only returned bool -- so the
raised OMNYTransferError always said "position N is not free"/"no
sample available at position N" even when the real cause was no
shuttle being parked at oparkz's current slot at all, which reads as
if the pin itself were the problem. Widened both messages to cover
either cause, per Mirko's simplest-fix suggestion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Mupip8x7Hean6E3FFvpbj
This commit is contained in:
x01dcandClaude Sonnet 5 committed 2026-09-06 12:25:39 +02:00
1 parent a7429b2de2
commit 415d55f599
1 file changed
+8 -2
@@ -793,7 +793,10 @@ class OMNYSampleTransferMixin:
self.transfer_step = 0
self._otransfer_check_sensor_connected()
if not self._otransfer_check_free_slot_available_at_position(pin_position, 0):
raise OMNYTransferError(f"position {pin_position} is not free")
raise OMNYTransferError(
f"position {pin_position} is not free, or no shuttle is parked at the"
" active parking position"
)
# global _ogalil_encoder_steps_per_mm
if pin_position == 0:
@@ -940,7 +943,10 @@ class OMNYSampleTransferMixin:
self._otransfer_check_sensor_connected()
if not self._otransfer_check_sample_available_at_position(pin_position, 0):
raise OMNYTransferError(f"There is no sample available at position {pin_position}")
raise OMNYTransferError(
f"There is no sample available at position {pin_position}, or no shuttle is"
" parked at the active parking position"
)
# global _otransy_approach_height
# global _ogalil_encoder_steps_per_mm