diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 8 | ||||
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 15 |
2 files changed, 18 insertions, 5 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index ab757be8a..d09b5bb15 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -510,6 +510,8 @@ public: /*! * Get the currently set LO source. + * Channels without controllable LO sources will return + * "internal" * \param name the name of the LO stage to query * \param chan the channel index 0 to N-1 * \return the configured LO source @@ -518,6 +520,8 @@ public: /*! * Get a list of possible LO sources. + * Channels which do not have controllable LO sources + * will return "internal". * \param name the name of the LO stage to query * \param chan the channel index 0 to N-1 * \return a vector of strings for possible settings @@ -552,6 +556,8 @@ public: /*! * Get the current RX LO frequency (Advanced). + * If the channel does not have independently configurable LOs + * the current rf frequency will be returned. * \param name the name of the LO stage to query * \param chan the channel index 0 to N-1 * \return the configured LO frequency @@ -560,6 +566,8 @@ public: /*! * Get the LO frequency range of the RX LO. + * If the channel does not have independently configurable LOs + * the rf frequency range will be returned. * \param name the name of the LO stage to query * \param chan the channel index 0 to N-1 * \return a frequency range object 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<std::string> {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<double>(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<meta_range_t>(rx_rf_fe_root(chan) / "freq" / "range").get(); } } |