Skip to content

Conversation

@agalasso
Copy link
Contributor

@agalasso agalasso commented Dec 22, 2025

Fix assumption that binning choices are consecutive int values.

When software binning is added #738, there may be gaps in the list of allowed binning
levels.

@agalasso agalasso self-assigned this Dec 22, 2025
@agalasso agalasso requested a review from bwdev01 December 22, 2025 04:02
@agalasso agalasso force-pushed the andy/unreachable-code branch from b14b68c to 513517a Compare December 22, 2025 06:10
@agalasso agalasso force-pushed the andy/binning-options-do-not-assume-consecutive-ints branch from 8e0843e to 584c9b2 Compare December 22, 2025 06:10
@agalasso agalasso force-pushed the andy/unreachable-code branch from 513517a to ffbc498 Compare December 22, 2025 06:44
@agalasso agalasso force-pushed the andy/binning-options-do-not-assume-consecutive-ints branch from 584c9b2 to ac51654 Compare December 22, 2025 06:44
@agalasso agalasso force-pushed the andy/unreachable-code branch from ffbc498 to a568ae7 Compare December 22, 2025 06:53
@agalasso agalasso force-pushed the andy/binning-options-do-not-assume-consecutive-ints branch from ac51654 to d2b2f61 Compare December 22, 2025 06:53
Copy link
Contributor

@bwdev01 bwdev01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't these non-null checks on m_binning be removed as in the previous PR? Long ago, we didn't create various controls if the camera didn't support them but this was error-prone with "omnibus" drivers. So now we always create the controls and just disable them if the device doesn't support them (late-binding)

@agalasso
Copy link
Contributor Author

agalasso commented Dec 24, 2025

Can't these non-null checks on m_binning be removed

Good point. Made #1420 to fix it.

@agalasso agalasso force-pushed the andy/unreachable-code branch from a568ae7 to 7e42e41 Compare December 24, 2025 17:58
@agalasso agalasso force-pushed the andy/binning-options-do-not-assume-consecutive-ints branch 2 times, most recently from 992bb31 to b3ea3f7 Compare December 24, 2025 22:00
@agalasso agalasso force-pushed the andy/unreachable-code branch from 7e42e41 to cc12873 Compare December 25, 2025 02:30
@agalasso agalasso force-pushed the andy/binning-options-do-not-assume-consecutive-ints branch from b3ea3f7 to 276d1d6 Compare December 25, 2025 02:30
@agalasso agalasso force-pushed the andy/unreachable-code branch from cc12873 to f6a0780 Compare December 31, 2025 22:10
Base automatically changed from andy/unreachable-code to master December 31, 2025 22:10
When software binning is added, there may be gaps in the list of allowed binning
levels.
@agalasso agalasso force-pushed the andy/binning-options-do-not-assume-consecutive-ints branch from 276d1d6 to c9e2481 Compare December 31, 2025 22:10
@agalasso agalasso merged commit ad1b844 into master Dec 31, 2025
4 checks passed
@agalasso agalasso deleted the andy/binning-options-do-not-assume-consecutive-ints branch December 31, 2025 22:10
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.

3 participants