mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
python: Allow SubdevSpec to be implied from a string
This allows the following:
```py
my_usrp.set_rx_subdev_spec("A:0 B:0")
```
Without this change, only the following was possible:
```py
my_usrp.set_rx_subdev_spec(uhd.usrp.SubdevSpec("A:0 B:0"))
```
Because the implicit-from-string version is possible in C++, we now also
enable it in Python.
This commit is contained in:
parent
ed2da77bba
commit
768ea58e92
@ -31,6 +31,8 @@ void export_subdev_spec(py::module& m)
|
||||
[](subdev_spec_t& self, const size_t idx) { return self.at(idx); })
|
||||
|
||||
;
|
||||
|
||||
py::implicitly_convertible<std::string, uhd::usrp::subdev_spec_t>();
|
||||
}
|
||||
|
||||
#endif /* INCLUDED_UHD_USRP_SUBDEV_SPEC_PYTHON_HPP */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user