From 1a25e4867b395a35b718effe9d89dd217ff71941 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 20 Nov 2011 20:26:38 -0800 Subject: basic: fix basic db center freq to always zero --- host/lib/usrp/dboard/db_basic_and_lf.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'host') 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("gains"); //phony property so this dir exists this->get_rx_subtree()->create("freq/value") - .set(double(0.0)); + .publish(&always_zero_freq); this->get_rx_subtree()->create("freq/range") .set(freq_range_t(-_max_freq, +_max_freq)); this->get_rx_subtree()->create("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("gains"); //phony property so this dir exists this->get_tx_subtree()->create("freq/value") - .set(double(0.0)); + .publish(&always_zero_freq); this->get_tx_subtree()->create("freq/range") .set(freq_range_t(-_max_freq, +_max_freq)); this->get_tx_subtree()->create("antenna/value") -- cgit v1.2.3