diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-06-11 09:44:48 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-15 13:49:36 -0500 |
commit | f1361234091036fdf7e599c9596151732cbb5683 (patch) | |
tree | 7e876730fc6df8a6d1226131522897630b02f6b4 /host | |
parent | 7f5f771796de590c4ed4bba7b09cda3a906535c6 (diff) | |
download | uhd-f1361234091036fdf7e599c9596151732cbb5683.tar.gz uhd-f1361234091036fdf7e599c9596151732cbb5683.tar.bz2 uhd-f1361234091036fdf7e599c9596151732cbb5683.zip |
python: radio_control: Explicitly import ALL_CHANS into Python bindings
This avoids a dynamic linker error by copying the ALL_CHANS value into
the the Python bindings before using it.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/rfnoc/radio_control_python.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/rfnoc/radio_control_python.hpp b/host/lib/rfnoc/radio_control_python.hpp index 21dfcb744..2f76209f2 100644 --- a/host/lib/rfnoc/radio_control_python.hpp +++ b/host/lib/rfnoc/radio_control_python.hpp @@ -13,6 +13,9 @@ using namespace uhd::rfnoc; void export_radio_control(py::module& m) { + // Re-import ALL_CHANS here to avoid linker errors + const auto ALL_CHANS = radio_control::ALL_CHANS; + py::class_<radio_control, noc_block_base, radio_control::sptr>(m, "radio_control") .def(py::init(&block_controller_factory<radio_control>::make_from)) .def("set_rate", &radio_control::set_rate) @@ -137,7 +140,7 @@ void export_radio_control(py::module& m) .def("set_rx_dc_offset", py::overload_cast<const bool, size_t>(&radio_control::set_rx_dc_offset), py::arg("enb"), - py::arg("chan") = radio_control::ALL_CHANS) + py::arg("chan") = ALL_CHANS) .def("set_rx_dc_offset", py::overload_cast<const std::complex<double>&, size_t>( &radio_control::set_rx_dc_offset), |