1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-01 09:23:15 +00:00

add XTRX gain setting and reading (osmocom source)

This commit is contained in:
Jean-Michel Friedt 2022-05-19 13:38:03 +02:00 committed by Carles Fernandez
parent 8f2f0781a1
commit c7f3994683
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -101,8 +101,20 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
}
else
{
std::cout << "Actual RX Gain: " << osmosdr_source_->get_gain() << " dB...\n";
LOG(INFO) << "Actual RX Gain: " << osmosdr_source_->get_gain() << " dB...";
if (!osmosdr_args_.empty() && (osmosdr_args_.find("xtrx") != std::string::npos))
{
osmosdr_source_->set_gain(gain_, "LNA", 0);
osmosdr_source_->set_gain(rf_gain_, "TIA", 0);
osmosdr_source_->set_gain(if_gain_, "PGA", 0);
std::cout << "Actual XTRX LNA Gain: " << osmosdr_source_->get_gain("LNA", 0) << " dB...\n";
std::cout << "Actual XTRX TIA Gain: " << osmosdr_source_->get_gain("TIA", 0) << " dB...\n";
std::cout << "Actual XTRX PGA Gain: " << osmosdr_source_->get_gain("PGA", 0) << " dB...\n";
}
else
{
std::cout << "Actual RX Gain: " << osmosdr_source_->get_gain() << " dB...\n";
LOG(INFO) << "Actual RX Gain: " << osmosdr_source_->get_gain() << " dB...";
}
}
}