Skip to content

Commit 21fa5b3

Browse files
committed
Configure to write UIs to /epics/opi if it exists
1 parent 82836aa commit 21fa5b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/eiger_fastcs/__main__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,22 @@ def main(
4040
EigerIp = typer.Option("127.0.0.1", help="IP address of Eiger detector")
4141
EigerPort = typer.Option(8081, help="Port of Eiger HTTP server")
4242

43+
OPI_PATH = Path("/epics/opi")
44+
4345

4446
@app.command()
4547
def ioc(
4648
pv_prefix: str = typer.Argument(),
4749
ip: str = EigerIp,
4850
port: int = EigerPort,
4951
):
52+
ui_path = OPI_PATH if OPI_PATH.is_dir() else Path.cwd()
53+
5054
mapping = get_controller_mapping(ip, port)
5155

5256
backend = EpicsBackend(mapping, pv_prefix)
5357
backend.create_gui(
54-
EpicsGUIOptions(
55-
output_path=Path.cwd() / "eiger.bob", title=f"Eiger - {pv_prefix}"
56-
)
58+
EpicsGUIOptions(output_path=ui_path / "eiger.bob", title=f"Eiger - {pv_prefix}")
5759
)
5860
backend.get_ioc().run()
5961

0 commit comments

Comments
 (0)