diff --git a/src/openflexure_microscope_server/things/stage/__init__.py b/src/openflexure_microscope_server/things/stage/__init__.py index a16ae89c..e42e64e2 100644 --- a/src/openflexure_microscope_server/things/stage/__init__.py +++ b/src/openflexure_microscope_server/things/stage/__init__.py @@ -33,7 +33,11 @@ class RedefinedBaseMovementError(RuntimeError): class JogCommand: - """A base class for jog operations.""" + """A base class for jog operations. + + This class handles threading events used to interrupt previous jog commands. There + are two subclasses that are used by jogging `JogMoveCommand` and `JogStopCommand`. + """ def __init__(self) -> None: """Initialise a JogCommand.""" diff --git a/src/openflexure_microscope_server/things/stage/dummy.py b/src/openflexure_microscope_server/things/stage/dummy.py index 7e0f2bad..51af444e 100644 --- a/src/openflexure_microscope_server/things/stage/dummy.py +++ b/src/openflexure_microscope_server/things/stage/dummy.py @@ -72,6 +72,16 @@ class DummyStage(BaseStage): } def _apply_move(self, displacement: Sequence[int]) -> None: + """Make a move, this function is designed to be run in a thread by jogging. + + This can't be used for normal movements as the delays setting up the extra + threads causes autofucs to fail. As such `_hardware_move_relative` is similarly + structured. + + Interrupt this function with the ``self._abort_move`` event. + + :param displacement: The (x, y, z) position. + """ try: fraction_complete = 0.0 dt = self.step_time