Skip to content

Commit

Permalink
comment cleanup and updated missed widget calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Cunningham committed Sep 27, 2024
1 parent 1e64292 commit d09f253
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/pandablocks_ioc/_pvi.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def add_data_capture_pvi_info(
):
component = SignalRW(
name=epics_to_pvi_name(data_capture_record_name),
read_pv=data_capture_record_name,
read_pv=f"{Pvi.record_prefix}:{data_capture_record_name}",
write_pv=f"{Pvi.record_prefix}:{data_capture_record_name}",
write_widget=ButtonPanel(actions={"Start": "1", "Stop": "0"}),
read_widget=LED(),
Expand All @@ -92,12 +92,12 @@ def add_data_capture_pvi_info(
record_name=data_capture_record_name, group=group, component=component
)

# arm_epics_name: EpicsName,

def add_pcap_arm_pvi_info(group: PviGroup, pcap_arm_pvi_record: RecordWrapper):
pcap_arm_record_name = EpicsName("PCAP:ARM")
component = SignalRW(
name=epics_to_pvi_name(pcap_arm_record_name),
read_pv=pcap_arm_record_name,
read_pv=f"{Pvi.record_prefix}:{pcap_arm_record_name}",
write_pv=f"{Pvi.record_prefix}:{pcap_arm_record_name}",
write_widget=ButtonPanel(actions={"Arm": "1", "Disarm": "0"}),
read_widget=LED(),
Expand Down Expand Up @@ -131,7 +131,9 @@ def add_automatic_pvi_info(
access = "rw"

else:
component = SignalX(name=pvi_name, write_pv=record_name, value="")
component = SignalX(
name=pvi_name, write_pv=f"{Pvi.record_prefix}:{record_name}", value=""
)
access = "x"
elif writeable:
if useComboBox:
Expand Down Expand Up @@ -270,7 +272,7 @@ def configure_pvi(screens_dir: Optional[str], clear_bobfiles: bool):

Pvi._clear_bobfiles = clear_bobfiles


@staticmethod
def add_pvi_info(record_name: EpicsName, group: PviGroup, component: Component):
"""Add PVI Info to the global collection"""

Expand Down
1 change: 0 additions & 1 deletion src/pandablocks_ioc/ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,6 @@ async def _arm_on_update(self, new_val: int) -> None:

def create_block_records(
self,
# prefix: EpicsName,
block: str,
block_info: BlockInfo,
block_values: Dict[EpicsName, str],
Expand Down
2 changes: 1 addition & 1 deletion tests/test-bobfiles/DATA.bob
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
</widget>
<widget type="led" version="2.0.0">
<name>LED</name>
<pv_name>DATA:CAPTURE</pv_name>
<pv_name>TEST_PREFIX:DATA:CAPTURE</pv_name>
<x>417</x>
<y>100</y>
<width>20</width>
Expand Down
2 changes: 1 addition & 1 deletion tests/test-bobfiles/PCAP.bob
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</widget>
<widget type="led" version="2.0.0">
<name>LED</name>
<pv_name>PCAP:ARM</pv_name>
<pv_name>TEST_PREFIX:PCAP:ARM</pv_name>
<x>417</x>
<y>25</y>
<width>20</width>
Expand Down

0 comments on commit d09f253

Please sign in to comment.