Fixed get_param() & set param() to support all parameter types#61
Merged
Fixed get_param() & set param() to support all parameter types#61
Conversation
The pvc_set_param supported only numeric parameters. Now both functions can handle also rgn_type for PARAM_ROI.
…ed type. For example a value for ATTR_AVAIL is always boolean regardless of reported parameter type.
…current attribute.
Also extracted repeated sentences from many properties and mentioned it only once before the table.
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.
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:
PARAM_ROIthat usesrgn_typestructure on PVCAM side that is mapped to Python aslive_roiproperty using a dictionary with the same format as we return e.g. in metadata.smart_stream_typeon PVCAM side that is mapped to Python as a list on integers.get_paramto return correct value for attributes with fixed type, e.g.ATTR_AVAILshould always return a boolean value orATTR_COUNTshould return an int event forlive_roiandsmart_stream_exp_params.scan_line_timeproperty in favor ofprog_scan_line_timeto unify naming with all other programmable scan mode parameters.