Skip to content

Commit

Permalink
Fix enum handling in PAndA
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed May 17, 2024
1 parent f1a5f52 commit f2b64c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ophyd_async/panda/writers/_hdf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ async def get_signals_marked_for_capture(
capture_signals.keys(), capture_signals.values(), signal_values
):
signal_path = signal_path.replace("_capture", "")
if (signal_value.value in iter(Capture)) and (signal_value.value != Capture.No):
if (signal_value in iter(Capture)) and (signal_value != Capture.No):
signals_to_capture[signal_path] = CaptureSignalWrapper(
signal_object,
signal_value.value,
signal_value,
)

return signals_to_capture
Expand Down Expand Up @@ -149,7 +149,7 @@ async def open(self, multiplier: int = 1) -> Dict[str, DataKey]:
else split_path[-2]
)

for suffix in str(capture_signal.capture_type).split(" "):
for suffix in capture_signal.capture_type.split(" "):
self._datasets.append(
_HDFDataset(
name,
Expand Down
2 changes: 1 addition & 1 deletion tests/panda/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,4 @@ async def get_numeric_signal(_):
"ophyd_async.panda.writers._hdf_writer.get_signals_marked_for_capture",
get_numeric_signal,
):
assert "test-panda-block-1-Capture.Value" in await mock_writer.open()
assert "test-panda-block-1-Value" in await mock_writer.open()

0 comments on commit f2b64c8

Please sign in to comment.