fix(ddg1): fix suppress mcs updates
CI for csaxs_bec / test (push) Failing after 1m29s

This commit is contained in:
2026-06-19 16:23:00 +02:00
parent 3ad7220aaf
commit 210a4e3b93
@@ -55,7 +55,7 @@ from csaxs_bec.devices.epics.delay_generator_csaxs.delay_generator_csaxs import
LiteralChannels,
StatusBitsCompareStatus,
)
from csaxs_bec.devices.epics.mcs_card.mcs_card_csaxs import ACQUIRING
from csaxs_bec.devices.epics.mcs_card.mcs_card_csaxs import ACQUIRING, suppress_mca_callbacks
from csaxs_bec.devices.utils.utils import fetch_scan_info
if TYPE_CHECKING: # pragma: no cover
@@ -389,9 +389,10 @@ class DDG1(PSIDeviceBase, DelayGeneratorCSAXS):
# NOTE Clear the '_omit_mca_callbacks' flag. This makes sure that data received from the mca1...mca3
# counters are forwarded to BEC. Once the flag is set, we create a TransitionStatus DONE->ACQUIRING
# and start the acquisition through erase_start.put(1). Finally, we wait for the card to go to ACQUIRING state.
mcs._omit_mca_callbacks.clear() # pylint: disable=protected-access
status_acquiring = CompareStatus(mcs.acquiring, ACQUIRING.ACQUIRING)
mcs.erase_start.put(1)
with suppress_mca_callbacks(mcs):
mcs.erase_start.put(1)
mcs._omit_mca_callbacks.clear() # pylint: disable=protected-access
self.cancel_on_stop(status_acquiring)