aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-16 19:42:38 -0700
committerJosh Blum <josh@joshknows.com>2010-03-16 19:42:38 -0700
commit83c463d09613b72817a837117c5f0b23975c8def (patch)
tree88a33ce28c339b6cb6bfd31398630280226f04cc
parent12ca1b612c7d82d003b5ea9683417903e4cb043f (diff)
downloaduhd-83c463d09613b72817a837117c5f0b23975c8def.tar.gz
uhd-83c463d09613b72817a837117c5f0b23975c8def.tar.bz2
uhd-83c463d09613b72817a837117c5f0b23975c8def.zip
changes to get tuning working
-rw-r--r--host/lib/simple_device.cpp12
-rw-r--r--host/lib/usrp/dboard/basic.cpp8
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp2
3 files changed, 17 insertions, 5 deletions
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index 62a38cb79..79b035071 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -133,8 +133,16 @@ public:
_mboard = (*_dev)[DEVICE_PROP_MBOARD];
_rx_ddc = _mboard[named_prop_t(MBOARD_PROP_RX_DSP, "ddc0")];
_tx_duc = _mboard[named_prop_t(MBOARD_PROP_TX_DSP, "duc0")];
- _rx_subdev = _mboard[MBOARD_PROP_RX_DBOARD][DBOARD_PROP_SUBDEV];
- _tx_subdev = _mboard[MBOARD_PROP_TX_DBOARD][DBOARD_PROP_SUBDEV];
+
+ //extract rx subdevice
+ wax::obj rx_dboard = _mboard[MBOARD_PROP_RX_DBOARD];
+ std::string rx_subdev_in_use = rx_dboard[DBOARD_PROP_USED_SUBDEVS].as<prop_names_t>().at(0);
+ _rx_subdev = rx_dboard[named_prop_t(DBOARD_PROP_SUBDEV, rx_subdev_in_use)];
+
+ //extract tx subdevice
+ wax::obj tx_dboard = _mboard[MBOARD_PROP_TX_DBOARD];
+ std::string tx_subdev_in_use = tx_dboard[DBOARD_PROP_USED_SUBDEVS].as<prop_names_t>().at(0);
+ _tx_subdev = tx_dboard[named_prop_t(DBOARD_PROP_SUBDEV, tx_subdev_in_use)];
}
~simple_device_impl(void){
diff --git a/host/lib/usrp/dboard/basic.cpp b/host/lib/usrp/dboard/basic.cpp
index f88faf6a0..02b391244 100644
--- a/host/lib/usrp/dboard/basic.cpp
+++ b/host/lib/usrp/dboard/basic.cpp
@@ -172,11 +172,13 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
case SUBDEV_PROP_ENABLED:
return; // it wont do you much good, but you can set it
+ case SUBDEV_PROP_FREQ:
+ return; // it wont do you much good, but you can set it
+
case SUBDEV_PROP_NAME:
case SUBDEV_PROP_OTHERS:
case SUBDEV_PROP_GAIN_RANGE:
case SUBDEV_PROP_GAIN_NAMES:
- case SUBDEV_PROP_FREQ:
case SUBDEV_PROP_FREQ_RANGE:
case SUBDEV_PROP_ANTENNA_NAMES:
case SUBDEV_PROP_QUADRATURE:
@@ -278,11 +280,13 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){
case SUBDEV_PROP_ENABLED:
return; // it wont do you much good, but you can set it
+ case SUBDEV_PROP_FREQ:
+ return; // it wont do you much good, but you can set it
+
case SUBDEV_PROP_NAME:
case SUBDEV_PROP_OTHERS:
case SUBDEV_PROP_GAIN_RANGE:
case SUBDEV_PROP_GAIN_NAMES:
- case SUBDEV_PROP_FREQ:
case SUBDEV_PROP_FREQ_RANGE:
case SUBDEV_PROP_ANTENNA_NAMES:
case SUBDEV_PROP_QUADRATURE:
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index cc7746720..e52c1e576 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -149,7 +149,7 @@ void usrp2_impl::recv_raw(rx_metadata_t &metadata){
//handle the packet count / sequence number
size_t expected_packet_count = _rx_stream_id_to_packet_seq[metadata.stream_id];
if (packet_count_out != expected_packet_count){
- std::cerr << "bad packet count: " << packet_count_out << std::endl;
+ std::cerr << "S" << (packet_count_out - expected_packet_count)%16;
}
_rx_stream_id_to_packet_seq[metadata.stream_id] = (packet_count_out+1)%16;