Merge branch 'config-scan-dir' into 'v3'
Add scan directory to json config Closes #393 See merge request openflexure/openflexure-microscope-server!283
This commit is contained in:
commit
ae2ec1864f
6 changed files with 58 additions and 19 deletions
|
|
@ -114,7 +114,8 @@ def _scan_running(method):
|
|||
|
||||
|
||||
class SmartScanThing(Thing):
|
||||
def __init__(self):
|
||||
def __init__(self, scans_folder):
|
||||
self._scans_folder = scans_folder
|
||||
self._preview_stitch_popen = None
|
||||
self._preview_stitch_popen_lock = threading.Lock()
|
||||
self._scan_lock = threading.Lock()
|
||||
|
|
@ -270,11 +271,8 @@ class SmartScanThing(Thing):
|
|||
|
||||
@property
|
||||
def base_scan_dir(self) -> str:
|
||||
"""This directory will hold all the scans we do."""
|
||||
# TODO: This should be determined using sensible configuration.
|
||||
# If the working directory is `/var/openflexure` this will result
|
||||
# in scans being saved at `/var/openflexure/scans/`
|
||||
return "scans"
|
||||
"""The path of the directory where the scans are saved."""
|
||||
return self._scans_folder
|
||||
|
||||
@thing_property
|
||||
def latest_scan_name(self) -> Optional[str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue