Repository navigation
Conversation
…eps the hardware trigger source The SDK moves the trigger source to software along with OPTION_TRIGGER only while the stream runs. Record + Z-Stack stops the stream between phases, so a run started from hardware-trigger live view switched to software trigger with the source still on GPIO0: the first z-stack trigger was ignored and the run aborted with no z-stack (3/3 on an ITR3CMOS26000KMA). Set the source explicitly, as the hardware branch does for its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maragall
force-pushed
the
fix/toupcam-software-trigger-source
branch
from
October 12, 2026 12:30
9cb9dcf to
c550ee7
Compare
maragall
changed the base branch from
feat/in-process-zarr-saving
to
feat/record-zstack-acquisition
October 12, 2026 12:31
Collaborator
Author
|
Closing: we are fixing this inside #564 instead (the z-stack switches to software trigger after its stream starts), so the shared ToupTek driver stays unchanged. ?? Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a ToupTek camera, switching from Hardware Trigger to Software Trigger while the stream is stopped leaves the camera unable to take software-triggered frames. The trigger mode becomes software, but the trigger source stays on the hardware input, so
Trigger()is ignored.Record + Z-Stack (#564) stops the stream between its phases, so a run started from Hardware Trigger live view hits this. The recording completes, then the z-stack's first trigger times out (
Timed out waiting ... for a frame, aborting acquisition) and no z-stack is written. This happened 3/3 times on an ITR3CMOS26000KMA.Cause
The SDK moves the trigger source (
IOCONTROLTYPE_TRIGGERSOURCE: 1 = GPIO0, 5 = software) along withOPTION_TRIGGERonly while the stream runs._set_acquisition_mode_impsets the source explicitly for hardware trigger, but leaves it to the SDK for software trigger. Measured at camera level, with no Record + Z-Stack involved:Fix
When entering
SOFTWARE_TRIGGER, set the trigger source to software explicitly, the way the hardware branch sets its own source. A camera that rejects the call only logs a warning, which is the same behaviour as today. Only ToupTek cameras are affected, and only when they enter software trigger. At startup and on a live-view switch the source is already 5, so the write changes nothing there.test_camera_toupcam_trigger_source.pymodels the stopped-stream behaviour with a fake SDK. It fails without the change and passes with it.Verified on hardware
On the ITR3CMOS26000KMA:
Not tested: level-mode hardware trigger (this microscope uses edge mode) and other ToupTek models.
Stacking
This PR is based on
feat/record-zstack-acquisition(#564) and merges into it; #564 is the branch that merges tomaster. The fix was briefly pushed directly on #564 (eb441dd) and has been reverted there (ee706e1), so this PR now holds it alone.🤖 Generated with Claude Code