fix(camera): pace hardware triggers so long strobe delays can elapse - #614
Open
Alpaca233 wants to merge 1 commit into
Open
fix(camera): pace hardware triggers so long strobe delays can elapse#614Alpaca233 wants to merge 1 commit into
Alpaca233 wants to merge 1 commit into
Conversation
Hamamatsu, Andor, Photometrics, and Tucsen only set _trigger_sent / _last_trigger_timestamp in the software-trigger branch, so get_ready_for_trigger() never throttled hardware triggers and LiveController re-sent them at the full requested fps. The MCU restarts its strobe-delay countdown on every trigger command, so whenever the trigger period was shorter than the strobe delay (e.g. ORCA-Fusion BT Ultra Quiet readout, ~200 ms, at >5 fps live) the countdown never finished and the illumination never turned on. Set the bookkeeping after both trigger branches, matching the FLIR and Toupcam drivers. Live view now self-throttles to the camera's actual frame time and the strobe fires on every frame. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Hamamatsu, Andor, Photometrics and Tucsen only set
_trigger_sent/_last_trigger_timestampinside the software-trigger branch ofsend_trigger(). So in hardware-trigger modeget_ready_for_trigger()never throttled anything, andLiveControllerre-sent triggers at the full requested fps.The MCU restarts its strobe-delay countdown on every trigger command. Whenever the trigger period was shorter than the strobe delay, the countdown never finished and the illumination never turned on — e.g. ORCA-Fusion BT Ultra Quiet readout (~200 ms strobe delay) at >5 fps live.
Fix
Set the bookkeeping after both trigger branches, matching what the FLIR and Toupcam drivers already do. Live view then self-throttles to the camera's actual frame time and the strobe fires on every frame.
Four drivers, +31/−8. No API or behaviour change for software-trigger mode.
Testing
tests/squid/test_camera.pyis unchanged by this commit: 7 failed / 2 passed both before and after, i.e. identical to cleanmaster— those failures are pre-existing onmaster, not introduced here. Likewiseblack --checkalready flagscamera_andor.pyonmasterbefore this change.Cherry-picked onto current
master(56db6965); applies cleanly.🤖 Generated with Claude Code