aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRyan Tucker <ryan.tucker@nuand.com>2017-07-20 15:03:47 -0400
committerDimitri Stolnikov <horiz0n@gmx.net>2018-08-15 19:53:26 +0200
commitea6cc4beb9052d28c7fa086fa65d4f45672a1202 (patch)
treed1c7c6dcc4b742dfe401d85bf89b32fde7fe44fc /lib
parent0132f6c4944c24db72f709e05015ab4feb40e021 (diff)
bladerf_common: add agc= option to set gain mode
Diffstat (limited to 'lib')
-rw-r--r--lib/bladerf/bladerf_common.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/bladerf/bladerf_common.cc b/lib/bladerf/bladerf_common.cc
index b6e91d4..70fb591 100644
--- a/lib/bladerf/bladerf_common.cc
+++ b/lib/bladerf/bladerf_common.cc
@@ -487,6 +487,16 @@ void bladerf_common::init(dict_t &dict, bladerf_direction direction)
<< std::endl;
}
+ /* Specify initial gain mode */
+ if (direction == BLADERF_RX) {
+ if (dict.count("agc")) {
+ set_gain_mode(boost::lexical_cast<bool>(dict["agc"]));
+ std::cerr << _pfx
+ << "Gain mode set to " << get_gain_mode()
+ << std::endl;
+ }
+ }
+
/* Initialize buffer and sample configuration */
_num_buffers = 0;
if (dict.count("buffers")) {