Added/updated docs
This commit is contained in:
parent
cb441201c6
commit
363094170e
3 changed files with 45 additions and 15 deletions
|
|
@ -5,13 +5,17 @@ from openflexure_microscope.lock import StrictLock
|
|||
# TODO: Implement lock on movement
|
||||
class Stage(OpenFlexureStage):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.lock = StrictLock(timeout=2) #: Strict lock controlling thread access to camera hardware
|
||||
"""
|
||||
Subclass of :py:class:`openflexure_stage.stage.OpenFlexureStage`,
|
||||
adding an instance of :py:class:`openflexure_microscope.lock.StrictLock` to regulate access.
|
||||
"""
|
||||
self.lock = StrictLock(timeout=2) #: :py:class:`openflexure_microscope.lock.StrictLock`: Strict lock controlling thread access to camera hardware
|
||||
|
||||
OpenFlexureStage.__init__(self, *args, **kwargs)
|
||||
|
||||
def _move_rel_nobacklash(self, *args, **kwargs):
|
||||
"""
|
||||
Overrides `OpenFlexureStage._move_rel_nobacklash` to acquire lock first.
|
||||
Overrides :py:function:`openflexure_stage.stage.OpenFlexureStage._move_rel_nobacklash` to acquire lock first.
|
||||
"""
|
||||
with self.lock:
|
||||
OpenFlexureStage._move_rel_nobacklash(self, *args, **kwargs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue