Use calibration_required property to conditionally render z cal step
This commit is contained in:
parent
5875abbceb
commit
f68515b17d
5 changed files with 50 additions and 12 deletions
|
|
@ -166,6 +166,9 @@ class BaseStage(lt.Thing):
|
|||
)
|
||||
"""Used to convert coordinates between the program frame and the hardware frame."""
|
||||
|
||||
calibration_required: bool = lt.setting(default=False)
|
||||
"""Whether calibration of the stage z axis is required."""
|
||||
|
||||
def update_position(self) -> None:
|
||||
"""Update the position property from the stage."""
|
||||
# Copy the position before the move.
|
||||
|
|
@ -535,3 +538,8 @@ class BaseStage(lt.Thing):
|
|||
This method provides the interface expected by the camera_stage_mapping.
|
||||
"""
|
||||
self.move_absolute(x=xyz_pos[0], y=xyz_pos[1], z=xyz_pos[2])
|
||||
|
||||
@lt.action
|
||||
def mark_calibration_complete(self) -> None:
|
||||
"""Mark stage calibration as complete."""
|
||||
self.calibration_required = False
|
||||
|
|
|
|||
|
|
@ -236,3 +236,6 @@ class SangaboardThing(BaseStage):
|
|||
self._sangaboard.query(f"{led_command} {on_brightness}")
|
||||
else:
|
||||
self._sangaboard.query(f"{led_command} 0")
|
||||
|
||||
calibration_required: bool = lt.setting(default=True)
|
||||
"""By default, Sangaboard stage will require calibration of z direction."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue