fix(flomni): abort sample transfer when stage-out is declined
CI for csaxs_bec / test (push) Successful in 1m45s

ftransfer_gripper_move() silently returned on "No" to the stage-out
confirmation, but its return was indistinguishable from success to its
callers (ftransfer_get_sample/ftransfer_put_sample), which then proceeded
to command the physical get/mount sequence on the controller -- moving
the gripper without the stage ever having moved out or the gripper being
positioned at the transfer coordinates. Now raises FlomniError instead,
which propagates out of both callers and stops the transfer before any
controller command is sent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
x01dcandClaude Sonnet 5 committed 2026-08-18 15:19:17 +02:00
1 parent 0a2c6a429c
commit 308b4edacd
1 file changed
+9 -8
@@ -1090,17 +1090,18 @@ class FlomniSampleTransferMixin:
if position == 0 and fsamx_pos > -160:
print("Use GUI interface.")
if self.ftransfer_confirm_dialog("May the flomni stage be moved out for the sample change? Feedback will be disabled and alignment will be lost!", "y"):
# if self.OMNYTools.yesno(
# "May the flomni stage be moved out for the sample change? Feedback will be disabled and alignment will be lost!",
# "y",
# ):
if self.ftransfer_confirm_dialog(
"May the flomni stage be moved out for the sample change? "
"Feedback will be disabled and alignment will be lost!",
"y",
):
print("OK. continue.")
self.ftransfer_flomni_stage_out()
else:
print("Stopping.")
return
raise FlomniError(
"Stage-out declined by user. Aborting sample transfer before any "
"gripper motion."
)
self.ensure_gripper_up()
self.check_tray_in()