Skip to content

Commit 8967593

Browse files
Add baton to i04 devices (#1732)
1 parent 400fe84 commit 8967593

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/dodal/beamlines/i04.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
)
1414
from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
1515
from dodal.devices.backlight import Backlight
16+
from dodal.devices.baton import Baton
1617
from dodal.devices.detector import DetectorParams
1718
from dodal.devices.detector.detector_motion import DetectorMotion
1819
from dodal.devices.diamond_filter import DiamondFilter, I04Filters
@@ -142,12 +143,20 @@ def transfocator() -> Transfocator:
142143
return Transfocator(f"{PREFIX.beamline_prefix}-MO-FSWT-01:")
143144

144145

146+
@device_factory()
147+
def baton() -> Baton:
148+
"""Get the i04 baton device, instantiate it if it hasn't already been.
149+
If this is called when already instantiated in i04, it will return the existing object.
150+
"""
151+
return Baton(f"{PREFIX.beamline_prefix}-CS-BATON-01:")
152+
153+
145154
@device_factory()
146155
def xbpm_feedback() -> XBPMFeedback:
147156
"""Get the i04 xbpm_feedback device, instantiate it if it hasn't already been.
148157
If this is called when already instantiated in i04, it will return the existing object.
149158
"""
150-
return XBPMFeedback(f"{PREFIX.beamline_prefix}-EA-FDBK-01:")
159+
return XBPMFeedback(f"{PREFIX.beamline_prefix}-EA-FDBK-01:", baton=baton())
151160

152161

153162
@device_factory()
@@ -236,6 +245,7 @@ def undulator() -> UndulatorInKeV:
236245
return UndulatorInKeV(
237246
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
238247
id_gap_lookup_table_path="/dls_sw/i04/software/daq_configuration/lookup/BeamLine_Undulator_toGap.txt",
248+
baton=baton(),
239249
)
240250

241251

0 commit comments

Comments
 (0)