diff options
author | Ryan Tucker <ryan.tucker@nuand.com> | 2017-07-20 15:03:47 -0400 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2018-08-15 19:53:26 +0200 |
commit | ea6cc4beb9052d28c7fa086fa65d4f45672a1202 (patch) | |
tree | d1c7c6dcc4b742dfe401d85bf89b32fde7fe44fc /lib | |
parent | 0132f6c4944c24db72f709e05015ab4feb40e021 (diff) |
bladerf_common: add agc= option to set gain mode
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bladerf/bladerf_common.cc | 10 |
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")) { |