python-microscope / microscope

Python library for control of microscope devices, supporting hardware triggers and distribution of devices over the network for performance and flexibility.
https://www.python-microscope.org
GNU General Public License v3.0
67 stars 39 forks source link

pvcam: bugged readout time #200

Closed dstoychev closed 3 years ago

dstoychev commented 3 years ago

There is a bug in the PVCAM SDK. The parameter PARAM_READOUT_TIME is defined as 64-bit float, but it's actually an unsigned 32-bit integer. Here is what the SDK documentation says:

The parameter type is incorrectly defined. The actual type is TYPE_UNS32.

Because we determine the type from this (wrong) definition, the value is not interpreted correctly. Instead of overhauling the entire parameter system, the easiest solution seems to be to add a simple check that corrects the type for this parameter only. An example implementation is in dstoychev/microscope@b13228db6068df7058b3ccf542013575280fb529.

iandobbie commented 3 years ago

Pulled fix into master