summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/codec_impl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp
index d7078d985..09bec6db2 100644
--- a/host/lib/usrp/usrp2/codec_impl.cpp
+++ b/host/lib/usrp/usrp2/codec_impl.cpp
@@ -47,6 +47,12 @@ void usrp2_mboard_impl::codec_init(void){
boost::bind(&usrp2_mboard_impl::tx_codec_get, this, _1, _2),
boost::bind(&usrp2_mboard_impl::tx_codec_set, this, _1, _2)
);
+
+ //initialize gain names. keeps get_rx_gain() from getting a gain
+ //that hasn't been set yet.
+ BOOST_FOREACH(std::string key, codec_rx_gain_ranges.keys()) {
+ _codec_rx_gains[key] = codec_rx_gain_ranges[key].start();
+ }
}
/***********************************************************************