Skip to content

Commit

Permalink
Make BimorphMirror.set await values in VOUT_RBV
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-fernandes committed Nov 28, 2024
1 parent e7e8021 commit 3944b78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/dodal/devices/bimorph_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self, prefix: str, name="", number_of_channels: int = 0):
}
)
self.alltrgt_proc = epics_signal_x(f"{prefix}:ALLTRGT.PROC")
self.status = epics_signal_r(str, f"{prefix}:STATUS")

super().__init__(name=name)

Expand All @@ -35,11 +36,19 @@ async def set(self, value: dict[int, float]):
await asyncio.gather(
*[self.channels.get(i).vtrgt.set(target) for i, target in value.items()]
)
await self.alltrgt_proc.trigger()

await asyncio.gather(
*[
wait_for_value(self.channels.get(i).vtrgt, target, None)
for i, target in value.items()
]
)

await self.alltrgt_proc.trigger()

await asyncio.gather(
*[
wait_for_value(self.channels.get(i).vout, target, None)
for i, target in value.items()
]
)

0 comments on commit 3944b78

Please sign in to comment.