Skip to content

Commit e0dcac9

Browse files
committed
Revert adsim changes for now
1 parent 7fe330f commit e0dcac9

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

src/dodal/beamlines/adsim.py

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from pathlib import PurePath
2-
from ophyd.epics_motor import EpicsMotor
3-
from ophyd_async.core import PathProvider, StaticPathProvider, UUIDFilenameProvider
41
from ophyd_async.epics.adsimdetector import SimDetector
52

6-
from dodal.device_manager import DeviceManager
3+
from dodal.common.beamlines.beamline_utils import (
4+
device_factory,
5+
get_path_provider,
6+
)
77
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
88
from dodal.common.beamlines.device_helpers import DET_SUFFIX, HDF5_SUFFIX
99
from dodal.devices.motors import XThetaStage
@@ -63,32 +63,19 @@
6363
6464
"""
6565

66-
devices = DeviceManager()
67-
68-
69-
@devices.fixture
70-
def path_provider() -> PathProvider:
71-
return StaticPathProvider(UUIDFilenameProvider(), PurePath("/"))
7266

73-
74-
@devices.factory(timeout=2, mock=False)
67+
@device_factory()
7568
def stage() -> XThetaStage:
7669
return XThetaStage(
7770
f"{PREFIX.beamline_prefix}-MO-SIMC-01:", x_infix="M1", theta_infix="M2"
7871
)
7972

8073

81-
@devices.factory(timeout=2)
82-
def det(path_provider: PathProvider) -> SimDetector:
74+
@device_factory()
75+
def det() -> SimDetector:
8376
return SimDetector(
8477
f"{PREFIX.beamline_prefix}-DI-CAM-01:",
85-
path_provider=path_provider,
78+
path_provider=get_path_provider(),
8679
drv_suffix=DET_SUFFIX,
8780
fileio_suffix=HDF5_SUFFIX,
8881
)
89-
90-
91-
@devices.v1_init(factory=EpicsMotor, prefix=f"{PREFIX.beamline_prefix}-MO-SIMC-01:M1")
92-
def old_motor(motor: EpicsMotor):
93-
# arbitrary post-init configuration
94-
motor.settle_time = 12

0 commit comments

Comments
 (0)