daq: fixed bug in mount where if current sample was manual it had no tell address so could not be set as "unmounted" - even if it was unmounted already.

This commit is contained in:
2026-04-27 11:55:31 +02:00
parent 828e534e49
commit ba86ab4663
+4 -3
View File
@@ -875,7 +875,8 @@ class AareDAQ:
self.__devs.tell.set_in_mount_position(True)
previous_sample = self.__cfg.current_sample
if target is None:
logger.debug(f"Unmounting sample: {previous_sample} (address: {previous_sample.tell_address()})")
if previous_sample is not None:
logger.debug(f"Unmounting sample: {previous_sample}")
try:
self.__devs.tell.unmount(wait=True, timeout=60.0)
self.__cfg.current_sample = target
@@ -885,9 +886,9 @@ class AareDAQ:
try:
#TODO: how to differentiate between mounting and unmounting fails
# during a typucal mount call as this is handled by Tell?
log_msg = f"Mounting sample: {target} (address: {target.tell_address()})"
log_msg = f"Mounting sample: {target}"
if previous_sample is not None:
log_msg = (f"Unmounting sample: {previous_sample} (address: {previous_sample.tell_address()})\n "
log_msg = (f"Unmounting sample: {previous_sample} \n "
f"and {log_msg}")
logger.debug(log_msg)
value = self.__devs.tell.mount(address=target.tell_address(), force=True, auto_unmount=True, read_dm=False,