Skip to content

Commit

Permalink
Update to ophyd-async v0.3a3 (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph authored May 3, 2024
1 parent 6ebb9fa commit afecc2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ classifiers = [
description = "Ophyd devices and other utils that could be used across DLS beamlines"
dependencies = [
"ophyd",
"ophyd-async>=0.3a2",
"ophyd-async>=0.3a3",
"bluesky",
"pyepics",
"dataclasses-json",
Expand Down
19 changes: 5 additions & 14 deletions src/dodal/devices/slits.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ class Slits(StandardReadable):
"""

def __init__(self, prefix: str, name: str = "") -> None:
self.x_gap = Motor(prefix + "X:SIZE")
self.y_gap = Motor(prefix + "Y:SIZE")
self.x_centre = Motor(prefix + "X:CENTRE")
self.y_centre = Motor(prefix + "Y:CENTRE")

# Type ignore pending: https://github.com/bluesky/ophyd-async/issues/192
self.set_readable_signals(
read=[
self.x_gap,
self.y_gap,
self.x_centre,
self.y_centre,
] # type: ignore
)
with self.add_children_as_readables():
self.x_gap = Motor(prefix + "X:SIZE")
self.y_gap = Motor(prefix + "Y:SIZE")
self.x_centre = Motor(prefix + "X:CENTRE")
self.y_centre = Motor(prefix + "Y:CENTRE")
super().__init__(name)

0 comments on commit afecc2c

Please sign in to comment.