Skip to content

Commit 81b36d9

Browse files
committed
fix: Swapped Pcap.Arm to a RW for ophyd-async
1 parent 37de998 commit 81b36d9

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/fastcs_pandablocks/panda/blocks/blocks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from fastcs_pandablocks.panda.client_wrapper import RawPanda
2828
from fastcs_pandablocks.panda.handlers import (
29-
ArmSender,
29+
ArmHandler,
3030
BitGroupOnUpdate,
3131
CaptureHandler,
3232
DefaultFieldHandler,
@@ -132,10 +132,10 @@ async def _add_pcap_arm(self):
132132

133133
pcap_block.add_attribute(
134134
pcap_name + PandaName(field="Arm"),
135-
AttrW(
136-
Enum(ArmSender.ArmCommand),
135+
AttrRW(
136+
Enum(ArmHandler.ArmCommand),
137137
description="Arm/Disarm the PandA.",
138-
handler=ArmSender(self._raw_panda.arm, self._raw_panda.disarm),
138+
handler=ArmHandler(self._raw_panda.arm, self._raw_panda.disarm),
139139
group=WidgetGroup.CAPTURE.value,
140140
),
141141
)

src/fastcs_pandablocks/panda/handlers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async def __call__(self, value: Any):
143143
)
144144

145145

146-
class ArmSender(Sender):
146+
class ArmHandler(Handler):
147147
"""A sender for arming and disarming the Pcap."""
148148

149149
class ArmCommand(enum.Enum):
@@ -167,3 +167,6 @@ async def put(
167167
else:
168168
logging.info("Disarming PandA.")
169169
await self.disarm()
170+
171+
async def update(self, controller: Any, attr: AttrR[ArmCommand]) -> None:
172+
pass

0 commit comments

Comments
 (0)