Flomni fixes #300

Merged
holler merged 2 commits from flomni_fixes into main 2026-08-19 10:30:03 +02:00
2 Commits
Author SHA1 Message Date
x01dcandClaude Sonnet 5 8936071766 fix(flomni): stop OSA collision at fosa_in(), correct stale foptz init position
CI for csaxs_bec / test (pull_request) Successful in 1m45s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m44s
fosa_in() moved fosax/fosay/fosaz straight to their configured "in"
positions with no collision check. ffzp_info() already computed OSA-to-pin
clearance but never gated the move on it. Add a shared
_osa_remaining_space() helper (also used to deduplicate ffzp_info()'s own
calculation) and raise FlomniOpticsError in fosa_in() when the computed
clearance at the target position is <= 0.

Root cause of the specific collision seen: stage init's _align_setup()
hardcoded foptz to 23 instead of its calibrated "in" value of 17
(ptycho_flomni.yaml), 6 mm off from what fosaz's own "in" calibration
assumes. Hardcode foptz to 17 instead, and lock foptz.limits to +-0.1 mm
around it in both set_limits() and _align_setup() so any future move away
from 17 requires deliberately widening the limits first. Also corrects
the stale "in: 23" in ptycho_flomni.yaml's foptz userParameter to 17.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 10:15:52 +02:00
x01dcandClaude Sonnet 5 308b4edacd 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>
2026-08-18 15:19:17 +02:00