Update qng_wrapper_linux.py
Fixed missing arg for reset and *char to python str conversion
This commit is contained in:
parent
ddc0e67712
commit
7cdd5990c6
1 changed files with 4 additions and 4 deletions
|
|
@ -19,7 +19,7 @@
|
|||
# SOFTWARE.
|
||||
|
||||
import platform
|
||||
from ctypes import cdll, c_void_p, c_int, c_double, POINTER, c_char
|
||||
from ctypes import cdll, c_void_p, c_int, c_double, POINTER, c_char, c_char_p, cast
|
||||
|
||||
|
||||
class QngWrapperLinux:
|
||||
|
|
@ -43,10 +43,10 @@ class QngWrapperLinux:
|
|||
|
||||
def deviceId(self):
|
||||
try:
|
||||
return self._qwqng_wrapper.DeviceID(self._qng_pointer)
|
||||
return cast(self._qwqng_wrapper.DeviceID(self._qng_pointer), c_char_p).value.decode("utf-8")
|
||||
except:
|
||||
self._qwqng_wrapper.Reset()
|
||||
return self._qwqng_wrapper.DeviceID(self._qng_pointer)
|
||||
self._qwqng_wrapper.Reset(self._qng_pointer)
|
||||
return cast(self._qwqng_wrapper.DeviceID(self._qng_pointer), c_char_p).value.decode("utf-8")
|
||||
|
||||
def randint32(self):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue