fix(flomni): don't crash feye_out() when fttrx1 isn't in the config

feye_out() unconditionally moved dev.fttrx1 out of the way, raising
an unhandled DeviceConfigError on any session (e.g. sim) where that
device isn't configured, after already having closed the shutter and
moved other optics. Now checks "fttrx1" in dev first (same pattern
already used for rtx elsewhere in this file) and, if absent, asks via
OMNYTools.yesno() whether to continue without moving it instead of
crashing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
x01dc
2026-07-13 16:20:06 +02:00
co-authored by Claude Sonnet 5
parent 7f7106c944
commit b3330e6bce
@@ -30,8 +30,17 @@ class FlomniOpticsMixin:
# move rotation stage to zero to avoid problems with wires
umv(dev.fsamroy, 0)
fttrx_in = self._get_user_param_safe("feyex", "fttrx_in")
umv(dev.fttrx1, fttrx_in)
if "fttrx1" not in dev:
if not self.OMNYTools.yesno(
"Device 'fttrx1' does not exist in the current config, so it "
"can't be moved out of the way. Continue anyway?"
):
print("Aborting feye_out(): fttrx1 not moved.")
return
else:
fttrx_in = self._get_user_param_safe("feyex", "fttrx_in")
umv(dev.fttrx1, fttrx_in)
def feye_in(self):
bec.queue.next_dataset_number += 1