Skip to content

Commit

Permalink
Add API to set title of generated UI
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed May 17, 2024
1 parent fb929a1 commit b6ac0f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fastcs/backends/epics/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class EpicsGUIFormat(Enum):
class EpicsGUIOptions:
output_path: Path = Path.cwd() / "output.bob"
file_format: EpicsGUIFormat = EpicsGUIFormat.bob
title: str = "Simple Device"


class EpicsGUI:
Expand Down Expand Up @@ -137,7 +138,7 @@ def create_gui(self, options: EpicsGUIOptions | None = None) -> None:
)
)

device = Device(label="Simple Device", children=components)
device = Device(label=options.title, children=components)

Check warning on line 141 in src/fastcs/backends/epics/gui.py

View check run for this annotation

Codecov / codecov/patch

src/fastcs/backends/epics/gui.py#L141

Added line #L141 was not covered by tests

formatter.format(device, options.output_path)

Expand Down

0 comments on commit b6ac0f1

Please sign in to comment.