sliakat / SpeReadPy

Python spe file reader and hub for Python automation of Lightfield and Picam
MIT License
13 stars 9 forks source link

temperature.py input parameter #17

Closed richienagi closed 1 year ago

richienagi commented 1 year ago

https://github.com/sliakat/SpeReadPy/blob/37655df696ff962adc31ef529ca2a80152d5d839/LFAutomation/Python/temperature.py#L80

Hello Sabbir,

For line 80 in the tempearure.py file (referenced above), I believe the parameter input should be a string (also cross-checked with the PICAM programmer's documentation). So should look something like this: set_temperature('-10')

Running the temperature.py file as it is currently results in run time errors.

Best Regards,

sliakat commented 1 year ago

Hi Richie,

You are correct the example, as written, results in a RuntimeError, but your propsed input is incorrect. The SetValue parameter will take a Double, explicitly cast as a .NET type.

I know the official TDY examples don't work as-is, but they were not written by me, so I will not change them. If you want working examples showing the proper .NET casting, check my PythonWebinar folder -- those are all written by me.

Final note that the PICAM SDK has no relation to the LF Automation SDK.

Best,

richienagi commented 1 year ago

Thanks for the clarification Sabbir!

sliakat commented 1 year ago

You are very welcome!