Move pre_scan and switch stream as late as possible
This commit is contained in:
parent
85eefcc903
commit
b0c9223b04
1 changed files with 4 additions and 4 deletions
|
|
@ -376,11 +376,7 @@ class SmartScanThing(OFMThing):
|
|||
starting x,y,z position.
|
||||
"""
|
||||
try:
|
||||
self._cam.start_streaming(main_resolution=(3280, 2464))
|
||||
self._scan_data = self._collect_scan_data(workflow)
|
||||
|
||||
workflow.pre_scan_routine(self._scan_data.workflow_settings)
|
||||
self.ongoing_scan.save_scan_data(self._scan_data)
|
||||
images_dir = self.ongoing_scan.images_dir
|
||||
# Type narrowing
|
||||
if images_dir is None:
|
||||
|
|
@ -388,6 +384,10 @@ class SmartScanThing(OFMThing):
|
|||
"Couldn't run scan, images directory was not created."
|
||||
)
|
||||
|
||||
self.ongoing_scan.save_scan_data(self._scan_data)
|
||||
self._cam.start_streaming(main_resolution=(3280, 2464))
|
||||
workflow.pre_scan_routine(self._scan_data.workflow_settings)
|
||||
|
||||
# If stitching settings are None then this type of scan can't be stitched
|
||||
if self.scan_data.stitching_settings is not None:
|
||||
# Settings exist, so create preview stitcher
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue