WaveForms-SDK-Getting-Started-PY icon indicating copy to clipboard operation
WaveForms-SDK-Getting-Started-PY copied to clipboard

Probleme with test_static-supplies.py

Open AghilesDouadi7 opened this issue 1 year ago • 0 comments

Hello and thank you for this work,

I want to program the IN/OUT of the Analog Discovery 2, and when I try to use your example "test_static-supplies.py", I encounter this error in static.py:

Exception has occurred: TypeError 'c_ushort' object cannot be interpreted as an integer File "/home/douadiag/Bureau/WaveForms-SDK-Getting-Started-PY-master/WF_SDK/static.py", line 138, in set_state if dwf.FDwfDigitalIOOutputSet(device_data.handle, ctypes.c_int(mask)) == 0: File "/home/douadiag/Bureau/WaveForms-SDK-Getting-Started-PY-master/test_static-supplies.py", line 36, in static.set_state(device_data, index, not(mask & pow(2, index))) TypeError: 'c_ushort' object cannot be interpreted as an integer**

Could you please help me resolve this error?

Thank you.

AghilesDouadi7 avatar Jun 21 '23 14:06 AghilesDouadi7