Closing microscope checks if hardware is attached
This commit is contained in:
parent
f42dcf8b95
commit
88647962f4
1 changed files with 4 additions and 2 deletions
|
|
@ -42,8 +42,10 @@ class Microscope(object):
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Shut down the microscope hardware."""
|
"""Shut down the microscope hardware."""
|
||||||
self.camera.close()
|
if self.camera:
|
||||||
self.stage.close()
|
self.camera.close()
|
||||||
|
if self.stage:
|
||||||
|
self.stage.close()
|
||||||
|
|
||||||
def attach(self, camera: StreamingCamera, stage: OpenFlexureStage, apply_config: bool=True):
|
def attach(self, camera: StreamingCamera, stage: OpenFlexureStage, apply_config: bool=True):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue