1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-03 02:13:16 +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

@ -99,12 +99,24 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
std::cout << "Actual VGA1 Gain: " << osmosdr_source_->get_gain("VGA1", 0) << " dB...\n";
std::cout << "Actual VGA2 Gain: " << osmosdr_source_->get_gain("VGA2", 0) << " dB...\n";
}
else
{
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...";
}
}
}
// Get actual bandwidth
std::cout << "Actual Bandwidth: " << osmosdr_source_->get_bandwidth(0) << " [Hz]...\n";