Skip to content

Commit

Permalink
Make IOC PV creation consistent with GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Jun 18, 2024
1 parent fc7401f commit 1f6d24b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fastcs/backends/epics/ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _create_and_link_attribute_pvs(mapping: Mapping) -> None:
path = single_mapping.controller.path
for attr_name, attribute in single_mapping.attributes.items():
attr_name = attr_name.title().replace("_", "")
pv_name = f"{':'.join(path).upper()}:{attr_name}" if path else attr_name
pv_name = f"{':'.join(path)}:{attr_name}" if path else attr_name

Check warning on line 91 in src/fastcs/backends/epics/ioc.py

View check run for this annotation

Codecov / codecov/patch

src/fastcs/backends/epics/ioc.py#L91

Added line #L91 was not covered by tests

match attribute:
case AttrRW():
Expand All @@ -105,7 +105,7 @@ def _create_and_link_command_pvs(mapping: Mapping) -> None:
path = single_mapping.controller.path
for attr_name, method in single_mapping.command_methods.items():
attr_name = attr_name.title().replace("_", "")
pv_name = f"{':'.join(path).upper()}:{attr_name}" if path else attr_name
pv_name = f"{':'.join(path)}:{attr_name}" if path else attr_name

Check warning on line 108 in src/fastcs/backends/epics/ioc.py

View check run for this annotation

Codecov / codecov/patch

src/fastcs/backends/epics/ioc.py#L108

Added line #L108 was not covered by tests

_create_and_link_command_pv(
pv_name, MethodType(method.fn, single_mapping.controller)
Expand Down

0 comments on commit 1f6d24b

Please sign in to comment.