Skip to content

Commit

Permalink
Make pvi_mapping not a child block...
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph committed Feb 14, 2024
1 parent 1aea92c commit 59bf40a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ophyd_async/panda/panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class PandA(Device):
seq: DeviceVector[SeqBlock]
pcap: PcapBlock

pvi_mapping: Dict[FrozenSet[str], Callable[..., Signal]] = {
_pvi_mapping: Dict[FrozenSet[str], Callable[..., Signal]] = {
frozenset({"r", "w"}): lambda dtype, read_pv, write_pv: epics_signal_rw(
dtype, read_pv, write_pv
),
Expand Down Expand Up @@ -205,7 +205,7 @@ def _make_signal(
"""
operations = frozenset(signal_pvi.keys())
pvs = [signal_pvi[i] for i in operations] # type: ignore
signal_factory = self.pvi_mapping[operations]
signal_factory = self._pvi_mapping[operations]

write_pv = "pva://" + pvs[0]
read_pv = "pva://" + pvs[1] if len(pvs) > 1 else None
Expand Down
4 changes: 2 additions & 2 deletions tests/panda/test_panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ async def sim_panda():


def test_panda_names_correct(sim_panda: PandA):
assert sim_panda.seq[1].name == "sim_panda-seq-1"
assert sim_panda.pulse[1].name == "sim_panda-pulse-1"
assert sim_panda.seq[1].name == "panda-seq-1"
assert sim_panda.pulse[1].name == "panda-pulse-1"


def test_panda_name_set():
Expand Down

0 comments on commit 59bf40a

Please sign in to comment.