diff options
author | Johnathan Corgan | 2012-04-05 11:53:24 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-04-05 11:53:24 -0700 |
commit | c6ae4c28efac7ed8603b0ae5db4709205af6123d (patch) | |
tree | c38eef38a3e259cee416404e292e650bc0c13015 /gr-uhd | |
parent | 5b11e7e7f69ef1ebe34c24c6a97da0450ab2e419 (diff) | |
parent | 99ebcc1c3ff453ea10e934ef1904b42821d589f1 (diff) | |
download | gnuradio-c6ae4c28efac7ed8603b0ae5db4709205af6123d.tar.gz gnuradio-c6ae4c28efac7ed8603b0ae5db4709205af6123d.tar.bz2 gnuradio-c6ae4c28efac7ed8603b0ae5db4709205af6123d.zip |
Merge branch 'master' into next
Diffstat (limited to 'gr-uhd')
-rwxr-xr-x | gr-uhd/apps/uhd_fft | 17 | ||||
-rw-r--r-- | gr-uhd/apps/uhd_siggen_base.py | 26 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_sink.h | 2 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_source.h | 2 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_sink.cc | 2 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 2 |
6 files changed, 32 insertions, 19 deletions
diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft index 9e2554768..0267ce46f 100755 --- a/gr-uhd/apps/uhd_fft +++ b/gr-uhd/apps/uhd_fft @@ -196,15 +196,24 @@ class app_top_block(stdgui2.std_top_block): callback=self.set_gain) try: - usrp_config_val = "%s (%s), %s (%s, %s, %s)" % (self.u.get_usrp_rx_info().get("mboard_id").split(" ")[0], self.u.get_usrp_rx_info().get("mboard_serial"), - self.u.get_usrp_rx_info().get("rx_id").split(" ")[0].split(",")[0], self.u.get_usrp_rx_info().get("rx_serial"), self.u.get_subdev_spec(), self.u.get_antenna()) + mboard_id = self.u.get_usrp_info().get("mboard_id").split(" ")[0] + mboard_serial = self.u.get_usrp_info().get("mboard_serial") + if mboard_serial == "": + mboard_serial = "no serial" + dboard_id = self.u.get_usrp_info().get("rx_id").split(" ")[0].split(",")[0] + dboard_serial = self.u.get_usrp_info().get("rx_serial") + if dboard_serial == "": + dboard_serial = "no serial" + subdev = self.u.get_subdev_spec() + antenna = self.u.get_antenna() + + usrp_config_val = "%s (%s), %s (%s, %s, %s)" % (mboard_id, mboard_serial, dboard_id, dboard_serial, subdev, antenna) except: usrp_config_val = "Not implemented in this version." uhd_box = forms.static_box_sizer(parent=self.panel, label="UHD (%s)" % (uhd.get_version_string()), - orient=wx.HORIZONTAL, - bold=True) + orient=wx.HORIZONTAL) usrp_config_form = forms.static_text( parent=self.panel, sizer=uhd_box, diff --git a/gr-uhd/apps/uhd_siggen_base.py b/gr-uhd/apps/uhd_siggen_base.py index 02f98facf..3c16440ab 100644 --- a/gr-uhd/apps/uhd_siggen_base.py +++ b/gr-uhd/apps/uhd_siggen_base.py @@ -109,18 +109,22 @@ class top_block(gr.top_block, pubsub): # Setup USRP Configuration value try: - usrp_info = self._u.get_usrp_tx_info() - usrp_mb = usrp_info.get("mboard_id").split(" ")[0] - usrp_mbs = usrp_info.get("mboard_serial") - usrp_db = usrp_info.get("tx_id").split(" ")[0] - usrp_dbs = usrp_info.get("tx_serial") - usrp_sd = self._u.get_subdev_spec() - usrp_ant = self._u.get_antenna() + usrp_info = self._u.get_usrp_info() + mboard_id = usrp_info.get("mboard_id").split(" ")[0] + mboard_serial = usrp_info.get("mboard_serial") + if mboard_serial == "": + mboard_serial = "no serial" + dboard_id = usrp_info.get("tx_id").split(" ")[0].split(",")[0] + dboard_serial = usrp_info.get("tx_serial") + if dboard_serial == "": + dboard_serial = "no serial" + subdev = self._u.get_subdev_spec() + antenna = self._u.get_antenna() - desc_key_str = "Motherboard: %s [%s]\n" % (usrp_mb, usrp_mbs) - desc_key_str += "Daughterboard: %s [%s]\n" % (usrp_db, usrp_dbs) - desc_key_str += "Subdev: %s\n" % usrp_sd - desc_key_str += "Antenna: %s" % usrp_ant + desc_key_str = "Motherboard: %s [%s]\n" % (mboard_id, mboard_serial) + desc_key_str += "Daughterboard: %s [%s]\n" % (dboard_id, dboard_serial) + desc_key_str += "Subdev: %s\n" % subdev + desc_key_str += "Antenna: %s" % antenna except: desc_key_str = "USRP configuration output not implemented in this version" diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h index fff567438..dffdf810f 100644 --- a/gr-uhd/include/gr_uhd_usrp_sink.h +++ b/gr-uhd/include/gr_uhd_usrp_sink.h @@ -137,7 +137,7 @@ public: * \param chan channel index 0 to N-1 * \return TX info */ - virtual uhd::dict<std::string, std::string> get_usrp_tx_info(size_t chan = 0) = 0; + virtual uhd::dict<std::string, std::string> get_usrp_info(size_t chan = 0) = 0; /*! * Set the frontend specification. diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index 0dde4b194..64e9fb098 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -129,7 +129,7 @@ public: * \param chan channel index 0 to N-1 * \return RX info */ - virtual uhd::dict<std::string, std::string> get_usrp_rx_info(size_t chan = 0) = 0; + virtual uhd::dict<std::string, std::string> get_usrp_info(size_t chan = 0) = 0; /*! * Set the frontend specification. diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index d86165f65..752817664 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -66,7 +66,7 @@ public: _dev = uhd::usrp::multi_usrp::make(device_addr); } - uhd::dict<std::string, std::string> get_usrp_tx_info(size_t chan){ + uhd::dict<std::string, std::string> get_usrp_info(size_t chan){ #ifdef UHD_USRP_MULTI_USRP_GET_USRP_INFO_API return _dev->get_usrp_tx_info(chan); #else diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 49558cee6..d06983cd3 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -70,7 +70,7 @@ public: _dev = uhd::usrp::multi_usrp::make(device_addr); } - uhd::dict<std::string, std::string> get_usrp_rx_info(size_t chan){ + uhd::dict<std::string, std::string> get_usrp_info(size_t chan){ #ifdef UHD_USRP_MULTI_USRP_GET_USRP_INFO_API return _dev->get_usrp_rx_info(chan); #else |