mirror of
https://github.com/nqrduck/LimeDriverBindings.git
synced 2024-09-20 20:50:35 +00:00
Bump version and add device listing
Updated the project version reflecting new features. Extended the LimeConfig_t struct to include a device string supporting device specification. Introduced a new function `get_device_list` in the Python binding, allowing users to retrieve a list of available devices, enhancing usability. This change improves user interactions with the hardware, making device management more intuitive.
This commit is contained in:
parent
a47961e311
commit
f48c034011
2 changed files with 10 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "limedriver"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
description = "Python bindings for limedriver"
|
||||
authors = [{name = "Kumi", email = "limedriver@kumi.email"}]
|
||||
license = {file = "LICENSE"}
|
||||
|
|
|
@ -5,13 +5,15 @@ from cpython.mem cimport PyMem_Malloc, PyMem_Free
|
|||
from libc.stdlib cimport malloc, free
|
||||
from libc.string cimport memcpy, strcpy
|
||||
|
||||
|
||||
from libcpp.vector cimport vector
|
||||
from libcpp.string cimport string
|
||||
|
||||
import pathlib
|
||||
|
||||
cdef extern from "limedriver.h":
|
||||
cdef struct LimeConfig_t:
|
||||
string device
|
||||
|
||||
float srate
|
||||
int channel
|
||||
int TX_matching
|
||||
|
@ -93,6 +95,8 @@ cdef extern from "limedriver.h":
|
|||
|
||||
cdef int run_experiment_from_LimeCfg(LimeConfig_t config)
|
||||
|
||||
cdef vector[string] getDeviceList()
|
||||
|
||||
|
||||
cdef class PyLimeConfig:
|
||||
cdef LimeConfig_t _config
|
||||
|
@ -704,3 +708,6 @@ cdef class PyLimeConfig:
|
|||
path = pathlib.Path(path).absolute()
|
||||
return path
|
||||
|
||||
def get_device_list():
|
||||
cdef vector[string] devices = getDeviceList()
|
||||
return [device.decode('utf-8') for device in devices]
|
Loading…
Reference in a new issue