Skip to content

Commit

Permalink
sampleprep tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jirhiker committed May 28, 2024
1 parent aff8af8 commit d9bfd72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions pychron/entry/tasks/sample_prep/sample_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,13 @@ def activated(self):

self._load_session_samples()

self.camera = CameraViewer()
# self.camera = ToupCamCamera()
self.camera.activate()
try:
self.camera = CameraViewer()
# self.camera = ToupCamCamera()
self.camera.activate()
except Exception as e:
self.debug_exception()
self.warning_dialog(f'Failed to activate camera. {e}')

self._load_choices()

Expand Down
3 changes: 2 additions & 1 deletion pychron/image/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from pychron.core.ui.qt.camera_editor import CameraEditor
from pychron.envisage.resources import icon
from pychron.image.i_camera import ICamera
from pychron.image.toupcam.camera import ToupCamCamera


# ============= standard library imports ========================
Expand Down Expand Up @@ -145,6 +144,8 @@ def _update_parameters(self):
pass

def open(self):
from pychron.image.toupcam.camera import ToupCamCamera

self._device = ToupCamCamera()
self._device.open()

Expand Down

0 comments on commit d9bfd72

Please sign in to comment.