aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-11-20 20:26:38 -0800
committerJosh Blum <josh@joshknows.com>2011-11-20 20:26:38 -0800
commit1a25e4867b395a35b718effe9d89dd217ff71941 (patch)
tree162391f688783c066705a92c309dae3f5a00df98 /host/lib
parente417d2f2f2a4e5ead7325cc38b04a5dc8cd4fa88 (diff)
downloaduhd-1a25e4867b395a35b718effe9d89dd217ff71941.tar.gz
uhd-1a25e4867b395a35b718effe9d89dd217ff71941.tar.bz2
uhd-1a25e4867b395a35b718effe9d89dd217ff71941.zip
basic: fix basic db center freq to always zero
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 53429a8c7..12b0e2ea1 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -30,6 +30,9 @@ using namespace uhd;
using namespace uhd::usrp;
using namespace boost::assign;
+//! provider function for the always zero freq
+static double always_zero_freq(void){return 0.0;}
+
/***********************************************************************
* Constants
**********************************************************************/
@@ -112,7 +115,7 @@ basic_rx::basic_rx(ctor_args_t args, double max_freq) : rx_dboard_base(args){
)));
this->get_rx_subtree()->create<int>("gains"); //phony property so this dir exists
this->get_rx_subtree()->create<double>("freq/value")
- .set(double(0.0));
+ .publish(&always_zero_freq);
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(freq_range_t(-_max_freq, +_max_freq));
this->get_rx_subtree()->create<std::string>("antenna/value")
@@ -161,7 +164,7 @@ basic_tx::basic_tx(ctor_args_t args, double max_freq) : tx_dboard_base(args){
)));
this->get_tx_subtree()->create<int>("gains"); //phony property so this dir exists
this->get_tx_subtree()->create<double>("freq/value")
- .set(double(0.0));
+ .publish(&always_zero_freq);
this->get_tx_subtree()->create<meta_range_t>("freq/range")
.set(freq_range_t(-_max_freq, +_max_freq));
this->get_tx_subtree()->create<std::string>("antenna/value")