Skip to content

Fixed get_param() & set param() to support all parameter types#61

Merged
tomhanak merged 11 commits intomasterfrom
fix-get-set-param
Oct 6, 2025
Merged

Fixed get_param() & set param() to support all parameter types#61
tomhanak merged 11 commits intomasterfrom
fix-get-set-param

Conversation

@tomhanak
Copy link
Contributor

@tomhanak tomhanak commented Oct 6, 2025

There were multiple issues with those two functions. Mainly, only numeric parameters were supported and the attributes with fixed type were returning wrong values in some cases.

Main changes:

  • Fixed floating-point parameter values to be mapped to Python Float, not Long. Luckily, PVCAM doesn't have floating-point parameters on recent cameras.
  • Added support for PARAM_ROI that uses rgn_type structure on PVCAM side that is mapped to Python as live_roi property using a dictionary with the same format as we return e.g. in metadata.
  • Added support for smart stream parameters where one uses smart_stream_type on PVCAM side that is mapped to Python as a list on integers.
  • Fixed get_param to return correct value for attributes with fixed type, e.g. ATTR_AVAIL should always return a boolean value or ATTR_COUNT should return an int event for live_roi and smart_stream_exp_params.
  • Deprecated scan_line_time property in favor of prog_scan_line_time to unify naming with all other programmable scan mode parameters.

@tomhanak tomhanak merged commit df0f425 into master Oct 6, 2025
6 checks passed
@tomhanak tomhanak deleted the fix-get-set-param branch October 6, 2025 17:14
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