Apply suggestions from code review of branch jogging

Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
This commit is contained in:
Julian Stirling 2026-02-17 17:56:26 +00:00
parent 56f68db5ca
commit ea3de5f45d
2 changed files with 3 additions and 6 deletions

View file

@ -38,7 +38,7 @@ class JogCommand:
def __init__(self, displacement: Optional[Sequence[int]]) -> None:
"""Initialise a JogCommand.
:param displacement: The distances as a sequence of the move for each axis.
:param displacement: The distances as a sequence of moves for each axis.
None for stop motion.
"""
super().__init__()
@ -347,7 +347,7 @@ class BaseStage(lt.Thing):
if not self._poll_moving():
# The stage is no longer moving, return None
return None
# If we reached here then the stage is still moving shorten timeout and
# If we reached here then the stage is still moving. Shorten timeout and
# check again.
timeout = 0.1

View file

@ -88,10 +88,7 @@ class DummyStage(BaseStage):
def _set_pos_during_move(
self, displacement: Sequence[int], fraction_complete: float
) -> None:
"""Set the instantaneous position from the fraction through a move.
If this is the final set, also update hardware position
"""
"""Set the instantaneous position based on the completed fraction of an ongoing move."""
self.instantaneous_position = {
ax: self._hardware_position[ax] + int(fraction_complete * disp)
for ax, disp in zip(self.axis_names, displacement, strict=True)