Skip to content

Commit

Permalink
Configure to write UIs to /epics/opi if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Jun 26, 2024
1 parent 82836aa commit 21fa5b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/eiger_fastcs/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,22 @@ def main(
EigerIp = typer.Option("127.0.0.1", help="IP address of Eiger detector")
EigerPort = typer.Option(8081, help="Port of Eiger HTTP server")

OPI_PATH = Path("/epics/opi")


@app.command()
def ioc(
pv_prefix: str = typer.Argument(),
ip: str = EigerIp,
port: int = EigerPort,
):
ui_path = OPI_PATH if OPI_PATH.is_dir() else Path.cwd()

mapping = get_controller_mapping(ip, port)

backend = EpicsBackend(mapping, pv_prefix)
backend.create_gui(
EpicsGUIOptions(
output_path=Path.cwd() / "eiger.bob", title=f"Eiger - {pv_prefix}"
)
EpicsGUIOptions(output_path=ui_path / "eiger.bob", title=f"Eiger - {pv_prefix}")
)
backend.get_ioc().run()

Expand Down

0 comments on commit 21fa5b3

Please sign in to comment.