daq: fixed dtecetor min and max bug if llm or hlm si missing in epics

This commit is contained in:
appleb_m
2026-06-23 12:44:30 +02:00
parent 071b4ab77f
commit f2895fb375
+12 -3
View File
@@ -3195,10 +3195,19 @@ class AareDAQ:
dtz_min = self.__cfg.cached_dtz_low
dtz_max = self.__cfg.cached_dtz_high
if dtz_min is None or dtz_max is None:
if (
dtz_min is None or dtz_max is None
or (dtz_min > dtz_max)
or (dtz_min == dtz_max)
or (dtz_min == 0 and dtz_max == 0)
):
logger.warning("DTZ limits missing from cache, using conservative defaults in beamline_status")
dtz_min = 20.0
dtz_max = 1000.0
dtz_min = cfg_get('daq.hardware.default_detector_distance_minimum', 100)
dtz_max = cfg_get('daq.hardware.default_detector_distance_maximum', 1000)
logger.warning(
f"using dtz_min {dtz_min} and dtz_max {dtz_max}"
)
return BeamlineStatus(
ring_current_mA=ring_current,
front_light=front_light,