Skip to content

fix(camera): pace hardware triggers so long strobe delays can elapse - #614

Open
Alpaca233 wants to merge 1 commit into
masterfrom
fix/camera-pace-hardware-triggers
Open

fix(camera): pace hardware triggers so long strobe delays can elapse#614
Alpaca233 wants to merge 1 commit into
masterfrom
fix/camera-pace-hardware-triggers

Conversation

@Alpaca233

Copy link
Copy Markdown
Collaborator

Problem

Hamamatsu, Andor, Photometrics and Tucsen only set _trigger_sent / _last_trigger_timestamp inside the software-trigger branch of send_trigger(). So in hardware-trigger mode get_ready_for_trigger() never throttled anything, and LiveController re-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.py is unchanged by this commit: 7 failed / 2 passed both before and after, i.e. identical to clean master — those failures are pre-existing on master, not introduced here. Likewise black --check already flags camera_andor.py on master before this change.

Cherry-picked onto current master (56db6965); applies cleanly.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant