diff --git a/src/dodal/devices/eiger.py b/src/dodal/devices/eiger.py index ade4ad468f..aae546e714 100644 --- a/src/dodal/devices/eiger.py +++ b/src/dodal/devices/eiger.py @@ -12,10 +12,6 @@ FREE_RUN_MAX_IMAGES = 1000000 -# TODO present for testing purposes, remove -TEST_1169_FIX = True -TEST_1169_INJECT = False - class InternalEigerTriggerMode(Enum): INTERNAL_SERIES = 0 @@ -101,7 +97,7 @@ def wait_on_arming_if_started(self): def stage(self): self.wait_on_arming_if_started() - if TEST_1169_INJECT or not self.is_armed(): + if not self.is_armed(): LOGGER.info("Eiger not armed, arming") self.async_stage().wait(timeout=self.ARMING_TIMEOUT) @@ -341,6 +337,10 @@ def do_arming_chain(self) -> Status: functions_to_do_arm.append(self.enable_roi_mode) arming_sequence_funcs = [ + # If a beam dump occurs after arming the eiger but prior to eiger staging, + # the odin may timeout which will cause the arming sequence to be retried; + # if this previously completed successfully we must reset the odin first + self.odin.stop, lambda: self.change_dev_shm(detector_params.enable_dev_shm), lambda: self.set_detector_threshold(detector_params.expected_energy_ev), self.set_cam_pvs, @@ -354,11 +354,6 @@ def do_arming_chain(self) -> Status: self._wait_fan_ready, self._finish_arm, ] - if TEST_1169_FIX: - # If a beam dump occurs after arming the eiger but prior to eiger staging, - # the odin may timeout which will cause the arming sequence to be retried; - # if this previously completed successfully we must reset the odin first - arming_sequence_funcs.insert(0, self.odin.stop) functions_to_do_arm.extend(arming_sequence_funcs) diff --git a/tests/devices/unit_tests/test_eiger.py b/tests/devices/unit_tests/test_eiger.py index 4cdcd6a611..a8e3cbdc21 100644 --- a/tests/devices/unit_tests/test_eiger.py +++ b/tests/devices/unit_tests/test_eiger.py @@ -9,7 +9,7 @@ from dodal.devices.detector import DetectorParams, TriggerMode from dodal.devices.detector.det_dim_constants import EIGER2_X_16M_SIZE -from dodal.devices.eiger import TEST_1169_FIX, EigerDetector +from dodal.devices.eiger import EigerDetector from dodal.devices.status import await_value from dodal.devices.util.epics_util import run_functions_without_blocking from dodal.log import LOGGER @@ -31,8 +31,6 @@ TEST_USE_ROI_MODE = False TEST_DET_DIST_TO_BEAM_CONVERTER_PATH = "tests/devices/unit_tests/test_lookup_table.txt" -TEST_1169_FIX = True - class StatusException(Exception): pass