diff --git a/src/crystallography_bluesky/i15_1/plans/wait_for_beam.py b/src/crystallography_bluesky/i15_1/plans/wait_for_beam.py index 4af6d0e..e7cd27c 100644 --- a/src/crystallography_bluesky/i15_1/plans/wait_for_beam.py +++ b/src/crystallography_bluesky/i15_1/plans/wait_for_beam.py @@ -2,11 +2,14 @@ import bluesky.plan_stubs as bps from bluesky.utils import MsgGenerator +from dodal.common import inject from dodal.devices.beamlines.i15_1.beam_health import BeamHealth from dodal.log import LOGGER +beam_health = inject("beam_health") -def wait_for_beam(beam_health: BeamHealth) -> MsgGenerator[None]: + +def wait_for_beam(beam_health: BeamHealth = beam_health) -> MsgGenerator[None]: t_start = time.time() while True: healthy: bool = yield from bps.rd(beam_health)