Skip to content

Commit

Permalink
more fixes after running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jennmald committed Nov 25, 2024
1 parent f20cf4b commit 21e3a19
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ophyd_async/epics/adaravis/_aravis_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _get_trigger_info(
if trigger == DetectorTrigger.INTERNAL:
return AravisTriggerMode.OFF, AravisTriggerSource.FREERUN
else:
return (AravisTriggerMode.on, f"Line{self.gpio_number}") # type: ignore
return (AravisTriggerMode.ON, f"Line{self.gpio_number}") # type: ignore

async def disarm(self):
await adcore.stop_busy_record(self._drv.acquire, False, timeout=1)
8 changes: 4 additions & 4 deletions src/ophyd_async/epics/adpilatus/_pilatus_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

class PilatusController(DetectorController):
_supported_trigger_types = {
DetectorTrigger.internal: PilatusTriggerMode.internal,
DetectorTrigger.constant_gate: PilatusTriggerMode.ext_enable,
DetectorTrigger.variable_gate: PilatusTriggerMode.ext_enable,
DetectorTrigger.INTERNAL: PilatusTriggerMode.INTERNAL,
DetectorTrigger.CONSTANT_GATE: PilatusTriggerMode.EXT_ENABLE,
DetectorTrigger.VARIABLE_GATE: PilatusTriggerMode.EXT_ENABLE,
}

def __init__(
Expand All @@ -44,7 +44,7 @@ async def prepare(self, trigger_info: TriggerInfo):
if trigger_info.total_number_of_triggers == 0
else trigger_info.total_number_of_triggers
),
self._drv.image_mode.set(adcore.ImageMode.multiple),
self._drv.image_mode.set(adcore.ImageMode.MULTIPLE),
)

async def arm(self):
Expand Down
2 changes: 1 addition & 1 deletion src/ophyd_async/plan_stubs/_fly.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def prepare_static_seq_table_flyer_and_detectors_with_same_trigger(

trigger_info = TriggerInfo(
number_of_triggers=number_of_frames * repeats,
trigger=DetectorTrigger.constant_gate,
trigger=DetectorTrigger.CONSTANT_GATE,
deadtime=deadtime,
livetime=exposure,
frame_timeout=frame_timeout,
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_device_save_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def test_save_device_all_types(
await device_all_types.my_int.set(1)
await device_all_types.my_float.set(1.234)
await device_all_types.my_str.set("test_string")
await device_all_types.enum.set(ExampleEnum.b)
await device_all_types.enum.set(ExampleEnum.B)
await device_all_types.enum2.set("Bbb")
for pv, dtype in {
device_all_types.int8a: np.int8,
Expand Down Expand Up @@ -141,7 +141,7 @@ async def test_save_device_all_types(
int=np.array([1, 8, -9, 32], np.int32),
float=np.array([1.8, 8.2, -6, 32.9887], np.float64),
str=["Hello", "World", "Foo", "Bar"],
enum=[ExampleEnum.a, ExampleEnum.b, ExampleEnum.a, ExampleEnum.c],
enum=[ExampleEnum.A, ExampleEnum.B, ExampleEnum.A, ExampleEnum.C],
)
)

Expand Down
2 changes: 1 addition & 1 deletion tests/epics/signal/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ def test_signal_helpers():
async def test_str_enum_returns_enum(ioc, protocol):
device = await connect_example_device(ioc, protocol)
val = await device.enum.get_value()
assert repr(val) == "<ExampleEnum.b: 'Bbb'>"
assert repr(val) == "<ExampleEnum.B: 'Bbb'>"
assert val is ExampleEnum.B
assert val == "Bbb"

Expand Down

0 comments on commit 21e3a19

Please sign in to comment.