scexao-org / camstack

EDT cam stack - python + minimal imgtake.c
5 stars 2 forks source link

`set_tint` coerce to float? #2

Closed mileslucas closed 1 year ago

mileslucas commented 1 year ago

Easy to get bitten when issuing cam.set_tint(1) or cam.set_tint(10) for example. At least with the dcams. Could add a line https://github.com/scexao-org/camstack/blob/f03b053758b054f8b79da64ebfc397557c82d8a2/camstack/cams/dcamcam.py#L260-L261

        return self._dcam_prm_setvalue(float(tint), 'EXPTIME',
                                       dcamprop.EProp.EXPOSURETIME)
DasVinch commented 1 year ago

Sounds like a good idea.

Side note, the DCAM API is a little weird because it has a get/set function template to only floats even for parameters that are just an IntEnum. That causes quirks in a number of places but shouldn't be a problem here.

Approve suggested fix in 646cc4b73c82ed71411bc8df9c6c4a36ebf5a43c. Might have to generalize that further down the line.