cversek / python-FLI

Python bindings for Finger Lakes Instrumentation (FLI) cameras and peripherals.
MIT License
10 stars 11 forks source link

USBCamera.set_temperature doesn't work #4

Closed cversek closed 11 years ago

cversek commented 11 years ago

Possibly, the following fact might have caused an issue with some method calls: the original code

 def set_temperature(self, T):
        "set the camera's temperature target in degrees Celcius"
        self._libfli.FLISetTemperature(self._dev, T)

did not explicitly convert the argument T to a ctype type. This conversion has been forced in the version:

 def set_temperature(self, T):
        "set the camera's temperature target in degrees Celcius"
        self._libfli.FLISetTemperature(self._dev, c_double(T))

A similar change was made for the num argument of USBCamera.set_flushes

def set_flushes(self, num):
    "set the number of flushes to the CCD before taking exposure"
    self._libfli.FLISetNFlushes(self._dev, c_long(num))