Flipped to explicit finite lock timeouts
This commit is contained in:
parent
832a9adbe3
commit
9cecb477cb
6 changed files with 35 additions and 30 deletions
|
|
@ -376,10 +376,12 @@ class FastAutofocusAPI(ActionView):
|
|||
if microscope.has_real_stage():
|
||||
logging.debug("Running autofocus...")
|
||||
|
||||
# return a handle on the autofocus task
|
||||
return fast_up_down_up_autofocus(
|
||||
microscope, dz=dz, mini_backlash=backlash
|
||||
)
|
||||
# Acquire microscope lock with 1s timeout
|
||||
with microscope.lock(timeout=1):
|
||||
# Run fast_up_down_up_autofocus
|
||||
return fast_up_down_up_autofocus(
|
||||
microscope, dz=dz, mini_backlash=backlash
|
||||
)
|
||||
|
||||
else:
|
||||
abort(503, "No stage connected. Unable to autofocus.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue