Skip to content

Commit

Permalink
Rename TriggerLogic to FlyerController
Browse files Browse the repository at this point in the history
  • Loading branch information
abbiemery committed Sep 13, 2024
1 parent 75b49a9 commit c765375
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/ophyd_async/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
set_signal_values,
walk_rw_signals,
)
from ._flyer import StandardFlyer, TriggerLogic
from ._flyer import StandardFlyer, FlyerController
from ._hdf_dataset import HDFDataset, HDFFile
from ._log import config_ophyd_async_logging
from ._mock_signal_backend import MockSignalBackend
Expand Down Expand Up @@ -101,7 +101,7 @@
"set_signal_values",
"walk_rw_signals",
"StandardFlyer",
"TriggerLogic",
"FlyerController",
"HDFDataset",
"HDFFile",
"config_ophyd_async_logging",
Expand Down
6 changes: 3 additions & 3 deletions src/ophyd_async/core/_flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ._utils import T, merge_gathered_dicts


class TriggerLogic(ABC, Generic[T]):
class FlyerController(ABC, Generic[T]):
@abstractmethod
async def prepare(self, value: T):
"""Move to the start of the flyscan"""
Expand All @@ -36,7 +36,7 @@ class StandardFlyer(
):
def __init__(
self,
trigger_logic: TriggerLogic[T],
trigger_logic: FlyerController[T],
configuration_signals: Sequence[SignalR] = (),
name: str = "",
):
Expand All @@ -45,7 +45,7 @@ def __init__(
super().__init__(name=name)

@property
def trigger_logic(self) -> TriggerLogic[T]:
def trigger_logic(self) -> FlyerController[T]:
return self._trigger_logic

@AsyncStatus.wrap
Expand Down
6 changes: 3 additions & 3 deletions src/ophyd_async/fastcs/panda/_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from pydantic import BaseModel, Field

from ophyd_async.core import TriggerLogic, wait_for_value
from ophyd_async.core import FlyerController, wait_for_value

from ._block import PcompBlock, PcompDirectionOptions, SeqBlock, TimeUnits
from ._table import SeqTable
Expand All @@ -15,7 +15,7 @@ class SeqTableInfo(BaseModel):
prescale_as_us: float = Field(default=1, ge=0) # microseconds


class StaticSeqTableTriggerLogic(TriggerLogic[SeqTableInfo]):
class StaticSeqTableTriggerLogic(FlyerController[SeqTableInfo]):
def __init__(self, seq: SeqBlock) -> None:
self.seq = seq

Expand Down Expand Up @@ -64,7 +64,7 @@ class PcompInfo(BaseModel):
)


class StaticPcompTriggerLogic(TriggerLogic[PcompInfo]):
class StaticPcompTriggerLogic(FlyerController[PcompInfo]):
def __init__(self, pcomp: PcompBlock) -> None:
self.pcomp = pcomp

Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
StandardDetector,
StandardFlyer,
TriggerInfo,
TriggerLogic,
FlyerController,
observe_value,
)
from ophyd_async.epics.signal import epics_signal_rw
Expand All @@ -31,7 +31,7 @@ class TriggerState(str, Enum):
stopping = "stopping"


class DummyTriggerLogic(TriggerLogic[int]):
class DummyTriggerLogic(FlyerController[int]):
def __init__(self):
self.state = TriggerState.null

Expand Down
4 changes: 2 additions & 2 deletions tests/epics/adcore/test_scans.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
StandardDetector,
StandardFlyer,
TriggerInfo,
TriggerLogic,
FlyerController,
set_mock_value,
)
from ophyd_async.epics import adcore, adsimdetector


class DummyTriggerLogic(TriggerLogic[int]):
class DummyTriggerLogic(FlyerController[int]):
def __init__(self): ...

async def prepare(self, value: int):
Expand Down
4 changes: 2 additions & 2 deletions tests/plan_stubs/test_fly.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
SignalR,
StandardDetector,
StandardFlyer,
TriggerLogic,
FlyerController,
WatchableAsyncStatus,
WatcherUpdate,
observe_value,
Expand Down Expand Up @@ -186,7 +186,7 @@ async def connect(self, mock: bool = False, timeout: float = DEFAULT_TIMEOUT):
class MockFlyer(StandardFlyer):
def __init__(
self,
trigger_logic: TriggerLogic,
trigger_logic: FlyerController,
configuration_signals: Sequence[SignalR] = ...,
name: str = "",
):
Expand Down

0 comments on commit c765375

Please sign in to comment.