Skip to content

Commit

Permalink
Configure to write bob UIs to /epics/opi if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Jun 24, 2024
1 parent 7f5779b commit 18f5cd5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/eiger_fastcs/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,22 @@ def main(
EigerUrl = typer.Option("127.0.0.1", help="URL 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(), url: str = EigerUrl, port: int = EigerPort):
def ioc(
pv_prefix: str = typer.Argument(),
url: str = EigerUrl,
port: int = EigerPort,
):
ui_path = OPI_PATH if OPI_PATH.is_dir() else Path.cwd()

mapping = get_controller_mapping(url, 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 18f5cd5

Please sign in to comment.