From 560e664199c478c8d71861b386ef65c5580e614c Mon Sep 17 00:00:00 2001 From: Derek Kozel Date: Fri, 5 Aug 2016 19:00:20 -0700 Subject: Improve LO APIs for daughterboards without configurable LOs --- host/lib/usrp/multi_usrp.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index b5df54a65..0c3c78fc6 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -897,7 +897,8 @@ public: } } } else { - throw uhd::runtime_error("This device does not support manual configuration of LOs"); + // If the daughterboard doesn't expose it's LO(s) then it can only be internal + return "internal"; } } @@ -918,7 +919,8 @@ public: } } } else { - throw uhd::runtime_error("This device does not support manual configuration of LOs"); + // If the daughterboard doesn't expose it's LO(s) then it can only be internal + return std::vector {1, "internal"}; } } @@ -958,7 +960,8 @@ public: } } } else { - throw uhd::runtime_error("This device does not support manual configuration of LOs"); + // If the daughterboard doesn't expose it's LO(s), assume it cannot export + return false; } } @@ -991,7 +994,8 @@ public: } } } else { - throw uhd::runtime_error("This device does not support manual configuration of LOs"); + // Return actual RF frequency if the daughterboard doesn't expose it's LO(s) + return _tree->access(rx_rf_fe_root(chan) / "freq" /" value").get(); } } @@ -1007,7 +1011,8 @@ public: } } } else { - throw uhd::runtime_error("This device does not support manual configuration of LOs"); + // Return the actual RF range if the daughterboard doesn't expose it's LO(s) + return _tree->access(rx_rf_fe_root(chan) / "freq" / "range").get(); } } -- cgit v1.2.3