Skip to content

Commit

Permalink
added code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Aug 12, 2024
1 parent 5e2187e commit 28b38d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/dodal/beamlines/adsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
set_utils_beamline(BL)


def stage(
def sim_motors(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> SimStage:
return device_instantiation(
Expand Down
15 changes: 8 additions & 7 deletions src/dodal/devices/adsim.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from ophyd_async.core import Device
from ophyd_async.core import StandardReadable
from ophyd_async.epics.motion import Motor


class SimStage(Device):
class SimStage(StandardReadable):
"""MotorBundle with the axes of the Diamond AdSimulator"""

def __init__(self, prefix: str, name: str = "sim"):
self.x = Motor(prefix + "M1")
self.y = Motor(prefix + "M2")
self.z = Motor(prefix + "M3")
self.theta = Motor(prefix + "M4")
self.load = Motor(prefix + "M5")
with self.add_children_as_readables():
self.x = Motor(prefix + "M1")
self.y = Motor(prefix + "M2")
self.z = Motor(prefix + "M3")
self.theta = Motor(prefix + "M4")
self.load = Motor(prefix + "M5")
super().__init__(name=name)
2 changes: 0 additions & 2 deletions tests/common/beamlines/test_device_instantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from dodal.common.beamlines import beamline_utils
from dodal.utils import BLUESKY_PROTOCOLS, make_all_devices

ALL_BEAMLINES = {"adsim", "i03", "i04", "i04_1", "i23", "i24", "p38", "p45"}


def follows_bluesky_protocols(obj: Any) -> bool:
return any(isinstance(obj, protocol) for protocol in BLUESKY_PROTOCOLS)
Expand Down

0 comments on commit 28b38d4

Please sign in to comment.