Skip to content

camera: only write trigger features if different in arv_camera_set_trigger and arv_camera_clear_triggers - #1107

Merged
EmmanuelP merged 2 commits into
AravisProject:mainfrom
feuerste:set_trigger_if_different
Oct 12, 2026
Merged

EmmanuelP merged 2 commits into
AravisProject:mainfrom
feuerste:set_trigger_if_different

Conversation

@feuerste

@feuerste feuerste commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

In arv_camera_set_trigger and arv_camera_clear_triggers:

  • Only write TriggerSelector, TriggerMode, TriggerActivation, and TriggerSource if their current value differs from the target value, via a new arv_camera_set_string_if_different helper.
  • In arv_camera_set_trigger, determine the target trigger selector (FrameStart, FrameBurstStart, or AcquisitionStart) first and skip disabling it in the loop over TriggerSelector entries, avoiding a redundant Off -> On transition on the target selector.

This avoids unnecessary register writes on cameras where writing trigger features (even with the same value or toggling TriggerMode Off and back On) can cause side effects or errors (e.g. when read-only or locked in the current camera state).

@feuerste
feuerste force-pushed the set_trigger_if_different branch from a00c10d to 79e4ec6 Compare October 12, 2026 06:18
@feuerste

Copy link
Copy Markdown
Contributor Author

#1109 will be required for the macOS test to complete.

@EmmanuelP
EmmanuelP merged commit 45bea40 into AravisProject:main Oct 12, 2026
6 checks passed
@EmmanuelP

Copy link
Copy Markdown
Contributor

Thanks

fmeum pushed a commit to bazelbuild/bazel-central-registry that referenced this pull request Oct 12, 2026
Updates `aravis` to latest `main` (including
AravisProject/aravis#1107) and addresses review
feedback from #6485 (removing redundant `overlay/MODULE.bazel` and
unused `ARAVIS_DATA_DIR` define).
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.

2 participants