aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-12-15 14:25:38 -0800
committerJosh Blum <josh@joshknows.com>2011-12-15 14:25:38 -0800
commit518d481ec24558724ead302635ab50fbaf71ca12 (patch)
tree6389b576aa2fda969d3340e2bfd527805e7c31f0
parent2304bd70a18140babbf1aafd4445d8b548b48686 (diff)
downloaduhd-518d481ec24558724ead302635ab50fbaf71ca12.tar.gz
uhd-518d481ec24558724ead302635ab50fbaf71ca12.tar.bz2
uhd-518d481ec24558724ead302635ab50fbaf71ca12.zip
tvrx: fixes for tvrx since the property tree work
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index dfa617e77..47807caa1 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -187,16 +187,15 @@ tvrx::tvrx(ctor_args_t args) : rx_dboard_base(args){
////////////////////////////////////////////////////////////////////
this->get_rx_subtree()->create<std::string>("name")
.set(get_rx_id().to_pp_string());
+ this->get_rx_subtree()->create<int>("sensors"); //phony property so this dir exists
BOOST_FOREACH(const std::string &name, get_tvrx_gain_ranges().keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
- .coerce(boost::bind(&tvrx::set_gain, this, _1, name))
- .set(get_tvrx_gain_ranges()[name].start());
+ .coerce(boost::bind(&tvrx::set_gain, this, _1, name));
this->get_rx_subtree()->create<meta_range_t>("gains/"+name+"/range")
.set(get_tvrx_gain_ranges()[name]);
}
this->get_rx_subtree()->create<double>("freq/value")
- .coerce(boost::bind(&tvrx::set_freq, this, _1))
- .set(tvrx_freq_range.start());
+ .coerce(boost::bind(&tvrx::set_freq, this, _1));
this->get_rx_subtree()->create<meta_range_t>("freq/range")
.set(tvrx_freq_range);
this->get_rx_subtree()->create<std::string>("antenna/value")
@@ -230,11 +229,12 @@ tvrx::tvrx(ctor_args_t args) : rx_dboard_base(args){
//set default freq
_lo_freq = tvrx_freq_range.start() + tvrx_if_freq; //init _lo_freq to a sane default
- set_freq(tvrx_freq_range.start());
+ this->get_rx_subtree()->access<double>("freq/value").set(tvrx_freq_range.start());
//set default gains
BOOST_FOREACH(const std::string &name, get_tvrx_gain_ranges().keys()){
- set_gain(get_tvrx_gain_ranges()[name].start(), name);
+ this->get_rx_subtree()->access<double>("gains/"+name+"/value")
+ .set(get_tvrx_gain_ranges()[name].start());
}
}