Skip to content

Commit b9dd0db

Browse files
committed
XimeaCamera._fetch_data: enable any hardware trigger mode.
Instead of error for any non-software trigger mode other than rising edge, just continue since we don't really care. We either have an image waiting for us or we don't and trigger mode should not make a difference on how we fetch the data.
1 parent a026e74 commit b9dd0db

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

microscope/cameras/ximea.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ def _fetch_data(self):
4444
return
4545

4646
trigger_type = self._handle.get_trigger_source()
47-
if trigger_type == 'XI_TRG_SOFTWARE':
48-
if not self._triggered:
49-
return
50-
# else, continue to fetch an image
51-
elif trigger_type != 'XI_TRG_EDGE_RISING':
52-
raise Exception('unhandled trigger type %s' % trigger_type)
47+
if trigger_type == 'XI_TRG_SOFTWARE' and not not self._triggered:
48+
return
49+
# else, we are either on 1) software trigger mode and have
50+
# already triggered, in which case there should be an image
51+
# waiting for us; or 2) any hardware trigger mode, in which
52+
# case we try to fetch an image and either we get one or it
53+
# times out if there is none.
5354

5455
try:
5556
self._handle.get_image(self.img)

0 commit comments

Comments
 (0)