From a0ceeddc497188a8cce7e45ba5c7473636073247 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 22 Sep 2016 16:00:31 -0700 Subject: cmake: Check for python requests, warn if not found (does not fail though) --- host/utils/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host/utils') diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt index 6f72c97bc..eb5a29df9 100644 --- a/host/utils/CMakeLists.txt +++ b/host/utils/CMakeLists.txt @@ -149,6 +149,9 @@ IF(LINUX) COMPONENT utilities ) ENDIF(LINUX) +IF(NOT HAVE_PYTHON_MODULE_REQUESTS) + MESSAGE(WARNING "Module requests not found -- uhd_images_downloader.py will not work without it.") +ENDIF(NOT HAVE_PYTHON_MODULE_REQUESTS) IF(ENABLE_USRP2) SET(burners -- cgit v1.2.3 From 96d16901e27ff653119d52823cfe4feb7a282aff Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 23 Sep 2016 12:00:18 -0700 Subject: utils: uhd_usrp_probe can query vector --- host/utils/uhd_usrp_probe.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'host/utils') diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp index 49e00d53a..5fc407bfa 100644 --- a/host/utils/uhd_usrp_probe.cpp +++ b/host/utils/uhd_usrp_probe.cpp @@ -228,6 +228,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("int", po::value(), "query a integer value from the property tree") ("sensor", po::value(), "query a sensor value from the property tree") ("range", po::value(), "query a range (gain, bandwidth, frequency, ...) from the property tree") + ("vector", "when querying a string, interpret that as std::vector") ("init-only", "skip all queries, only initialize device") ; @@ -250,7 +251,16 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ property_tree::sptr tree = dev->get_tree(); if (vm.count("string")){ - std::cout << tree->access(vm["string"].as()).get() << std::endl; + if (vm.count("vector")) { + std::vector str_vector = tree->access< std::vector >(vm["string"].as()).get(); + std::cout << "("; + BOOST_FOREACH(const std::string &str, str_vector) { + std::cout << str << ","; + } + std::cout << ")" << std::endl; + } else { + std::cout << tree->access(vm["string"].as()).get() << std::endl; + } return EXIT_SUCCESS; } -- cgit v1.2.3