SRSENB: tx gain per channel and fix bug

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent 13caf287f9
commit b3d66c98c3

@ -181,7 +181,7 @@ int radio::init(const rf_args_t& args, phy_interface_radio* phy_)
// Set individual gains
for (uint32_t i = 0; i < args.nof_carriers; i++) {
if (args.tx_gain_ch[i] > 0) {
for (uint32_t j = 0; j < nof_antennas; i++) {
for (uint32_t j = 0; j < nof_antennas; j++) {
uint32_t phys_antenna_idx = i * nof_antennas + j;
// From channel number deduce RF device index and channel

@ -90,6 +90,11 @@ void parse_args(all_args_t* args, int argc, char* argv[])
("rf.srate", bpo::value<double>(&args->rf.srate_hz)->default_value(0.0), "Force Tx and Rx sampling rate in Hz")
("rf.rx_gain", bpo::value<float>(&args->rf.rx_gain)->default_value(50), "Front-end receiver gain")
("rf.tx_gain", bpo::value<float>(&args->rf.tx_gain)->default_value(70), "Front-end transmitter gain")
("rf.tx_gain[0]", bpo::value<float>(&args->rf.tx_gain_ch[0])->default_value(-1), "Front-end transmitter gain CH0")
("rf.tx_gain[1]", bpo::value<float>(&args->rf.tx_gain_ch[1])->default_value(-1), "Front-end transmitter gain CH1")
("rf.tx_gain[2]", bpo::value<float>(&args->rf.tx_gain_ch[2])->default_value(-1), "Front-end transmitter gain CH2")
("rf.tx_gain[3]", bpo::value<float>(&args->rf.tx_gain_ch[3])->default_value(-1), "Front-end transmitter gain CH3")
("rf.tx_gain[4]", bpo::value<float>(&args->rf.tx_gain_ch[4])->default_value(-1), "Front-end transmitter gain CH4")
("rf.dl_freq", bpo::value<float>(&args->rf.dl_freq)->default_value(-1), "Downlink Frequency (if positive overrides EARFCN)")
("rf.ul_freq", bpo::value<float>(&args->rf.ul_freq)->default_value(-1), "Uplink Frequency (if positive overrides EARFCN)")

Loading…
Cancel
Save