bladerf_common: add agc= option to set gain mode

This commit is contained in:
Ryan Tucker 2017-07-20 15:03:47 -04:00 committed by Dimitri Stolnikov
parent 0132f6c494
commit ea6cc4beb9
1 changed files with 10 additions and 0 deletions

View File

@ -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")) {