aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/utils/uhd_usrp_probe.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index ae86b0dba..b19a59a8e 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -24,6 +24,7 @@
#include <uhd/usrp/dboard_id.hpp>
#include <uhd/usrp/mboard_eeprom.hpp>
#include <uhd/usrp/dboard_eeprom.hpp>
+#include <uhd/types/sensors.hpp>
#include <boost/program_options.hpp>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
@@ -206,6 +207,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("string", po::value<std::string>(), "query a string value from the property tree")
("double", po::value<std::string>(), "query a double precision floating point value from the property tree")
("int", po::value<std::string>(), "query a integer value from the property tree")
+ ("sensor", po::value<std::string>(), "query a sensor value from the property tree")
("range", po::value<std::string>(), "query a range (gain, bandwidth, frequency, ...) from the property tree")
("init-only", "skip all queries, only initialize device")
;
@@ -243,6 +245,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
return EXIT_SUCCESS;
}
+ if (vm.count("sensor")){
+ std::cout << tree->access<uhd::sensor_value_t>(vm["sensor"].as<std::string>()).get().value << std::endl;
+ return EXIT_SUCCESS;
+ }
+
if (vm.count("range")){
meta_range_t range = tree->access<meta_range_t>(vm["range"].as<std::string>()).get();
std::cout << boost::format("%.1f:%.1f:%.1f") % range.start() % range.step() % range.stop() << std::endl;