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.
|
# SOFTWARE.
|
||||||
|
|
||||||
import platform
|
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:
|
class QngWrapperLinux:
|
||||||
|
|
@ -43,10 +43,10 @@ class QngWrapperLinux:
|
||||||
|
|
||||||
def deviceId(self):
|
def deviceId(self):
|
||||||
try:
|
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:
|
except:
|
||||||
self._qwqng_wrapper.Reset()
|
self._qwqng_wrapper.Reset(self._qng_pointer)
|
||||||
return self._qwqng_wrapper.DeviceID(self._qng_pointer)
|
return cast(self._qwqng_wrapper.DeviceID(self._qng_pointer), c_char_p).value.decode("utf-8")
|
||||||
|
|
||||||
def randint32(self):
|
def randint32(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue