soapy: ordering of elements for bb/if gain

This commit is contained in:
Josh Blum 2015-02-17 19:57:27 -08:00
parent a960600a1e
commit 53ed8918f3
2 changed files with 8 additions and 8 deletions

View File

@ -233,15 +233,15 @@ double soapy_sink_c::get_gain( const std::string & name, size_t chan)
double soapy_sink_c::set_if_gain( double gain, size_t chan)
{
//assumes if gain is the last one listed
const std::string name = this->get_gain_names(chan).back();
//docs specify RF gain is the first element
const std::string name = this->get_gain_names(chan).front();
return this->set_gain(gain, name, chan);
}
double soapy_sink_c::set_bb_gain( double gain, size_t chan)
{
//assumes bb gain is the first one listed
const std::string name = this->get_gain_names(chan).front();
//docs specify baseband gain is the last element
const std::string name = this->get_gain_names(chan).back();
return this->set_gain(gain, name, chan);
}

View File

@ -230,15 +230,15 @@ double soapy_source_c::get_gain( const std::string & name, size_t chan )
double soapy_source_c::set_if_gain( double gain, size_t chan )
{
//assumes if gain is the last one listed
const std::string name = this->get_gain_names(chan).back();
//docs specify RF gain is the first element
const std::string name = this->get_gain_names(chan).front();
return this->set_gain(gain, name, chan);
}
double soapy_source_c::set_bb_gain( double gain, size_t chan )
{
//assumes bb gain is the first one listed
const std::string name = this->get_gain_names(chan).front();
//docs specify baseband gain is the last element
const std::string name = this->get_gain_names(chan).back();
return this->set_gain(gain, name, chan);
}