Remove old sangaboard abort_move action as moves are not cancelled with a cancel hook
This commit is contained in:
parent
4e20067c68
commit
222a0c973d
1 changed files with 0 additions and 15 deletions
|
|
@ -6,8 +6,6 @@ from typing import Iterator, Literal
|
|||
from contextlib import contextmanager
|
||||
from collections.abc import Mapping
|
||||
|
||||
from fastapi import HTTPException
|
||||
|
||||
import sangaboard
|
||||
from labthings_fastapi.decorators import thing_action
|
||||
from labthings_fastapi.dependencies.invocation import (
|
||||
|
|
@ -101,19 +99,6 @@ class SangaboardThing(BaseStage):
|
|||
cancel, block_cancellation=block_cancellation, **displacement
|
||||
)
|
||||
|
||||
@thing_action
|
||||
def abort_move(self):
|
||||
"""Abort a current move"""
|
||||
if self.moving:
|
||||
# Skip the lock - because we need to write **before** the current query
|
||||
# finishes. This merits further careful thought for thread safety.
|
||||
# TODO: more robust aborts
|
||||
logging.warning("Aborting move: this is an experimental feature!")
|
||||
tc = self._sangaboard.termination_character
|
||||
self._sangaboard._ser.write(("stop" + tc).encode())
|
||||
else:
|
||||
raise HTTPException(status_code=409, detail="Stage is not moving.")
|
||||
|
||||
@thing_action
|
||||
def set_zero_position(self):
|
||||
"""Make the current position zero in all axes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue