Improve some jogging docstrings

This commit is contained in:
Julian Stirling 2026-02-13 10:49:10 +00:00
parent 8478194e30
commit f1d974c922
2 changed files with 15 additions and 1 deletions

View file

@ -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."""

View file

@ -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