Skip to content

Commit

Permalink
Make pvi aware of DeviceVectors
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Oct 25, 2024
1 parent 23bb1de commit 6eeedd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ophyd_async/epics/core/_pvi_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def create_children_from_annotations(self, device: Device):

def _fill_child(self, name: str, entry: Entry, vector_index: int | None = None):
if set(entry) == {"d"}:
connector = self.filler.fill_child_device(name)
connector = self.filler.fill_child_device(name, vector_index=vector_index)
connector.pvi_pv = entry["d"]
else:
signal_type, read_pv, write_pv = _get_signal_details(entry)
backend = self.filler.fill_child_signal(name, signal_type)
backend = self.filler.fill_child_signal(name, signal_type, vector_index)
backend.read_pv = read_pv
backend.write_pv = write_pv

Expand Down
5 changes: 3 additions & 2 deletions tests/fastcs/panda/test_panda_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ async def test_panda_with_missing_blocks(panda_pva, panda_t):
with pytest.raises(
RuntimeError,
match=re.escape(
"mypanda: cannot provision ['pcap'] from PANDAQSRVI:PVI: {'pulse1': "
"{'d': 'PANDAQSRVI:PULSE1:PVI'}, 'seq1': {'d': 'PANDAQSRVI:SEQ1:PVI'}}"
"mypanda: cannot provision ['pcap'] from PANDAQSRVI:PVI: "
"{'pulse': [None, {'d': 'PANDAQSRVI:PULSE1:PVI'}],"
" 'seq': [None, {'d': 'PANDAQSRVI:SEQ1:PVI'}]}"
),
):
await panda.connect()
Expand Down

0 comments on commit 6eeedd7

Please sign in to comment.