1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Merge branch 'next' into gal_e6_msg

This commit is contained in:
Carles Fernandez 2021-06-05 22:41:55 +02:00
commit 1307083a95
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 47 additions and 25 deletions

View File

@ -29,6 +29,7 @@
#include <exception>
#include <iostream>
#include <utility>
#include <vector>
using namespace std::string_literals;
@ -170,7 +171,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
std::cout << "device address: " << uri_ << '\n';
std::cout << "LO frequency : " << freq_ << " Hz\n";
std::cout << "sample rate: " << sample_rate_ << " Hz\n";
std::cout << "sample rate: " << sample_rate_ << " Sps\n";
if (item_type_ == "gr_complex")
{
@ -183,15 +184,24 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
else
{
#if GNURADIO_API_IIO
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make(
uri_.c_str(), freq_, sample_rate_,
bandwidth_,
rx1_en_, rx2_en_,
buffer_size_, quadrature_, rf_dc_,
bb_dc_, gain_mode_rx1_.c_str(), rf_gain_rx1_,
gain_mode_rx2_.c_str(), rf_gain_rx2_,
rf_port_select_.c_str(), filter_source_.c_str(),
filter_filename_.c_str(), Fpass_, Fstop_);
std::vector<bool> enable_channels{rx1_en_, rx2_en_};
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source::make(uri_, enable_channels, buffer_size_);
fmcomms2_source_f32c_->set_frequency(freq_);
fmcomms2_source_f32c_->set_samplerate(sample_rate_);
if (rx1_en_)
{
fmcomms2_source_f32c_->set_gain_mode(0, gain_mode_rx1_);
fmcomms2_source_f32c_->set_gain(0, rf_gain_rx1_);
}
if (rx2_en_)
{
fmcomms2_source_f32c_->set_gain_mode(1, gain_mode_rx2_);
fmcomms2_source_f32c_->set_gain(1, rf_gain_rx2_);
}
fmcomms2_source_f32c_->set_quadrature(quadrature_);
fmcomms2_source_f32c_->set_rfdc(rf_dc_);
fmcomms2_source_f32c_->set_bbdc(bb_dc_);
fmcomms2_source_f32c_->set_filter_params(filter_source_, filter_filename_, Fpass_, Fstop_);
#else
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make(
uri_.c_str(), freq_, sample_rate_,
@ -250,15 +260,18 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
else
{
#if GNURADIO_API_IIO
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make(
uri_.c_str(), freq_, sample_rate_,
bandwidth_,
rx1_en_, rx2_en_,
buffer_size_, quadrature_, rf_dc_,
bb_dc_, gain_mode_rx1_.c_str(), rf_gain_rx1_,
gain_mode_rx2_.c_str(), rf_gain_rx2_,
rf_port_select_.c_str(), filter_source_.c_str(),
filter_filename_.c_str(), Fpass_, Fstop_);
std::vector<bool> enable_channels{rx1_en_, rx2_en_};
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source::make(uri_, enable_channels, buffer_size_);
fmcomms2_source_f32c_->set_frequency(freq_);
fmcomms2_source_f32c_->set_samplerate(sample_rate_);
fmcomms2_source_f32c_->set_gain_mode(0, gain_mode_rx1_);
fmcomms2_source_f32c_->set_gain(0, rf_gain_rx1_);
fmcomms2_source_f32c_->set_gain_mode(1, gain_mode_rx2_);
fmcomms2_source_f32c_->set_gain(1, rf_gain_rx2_);
fmcomms2_source_f32c_->set_quadrature(quadrature_);
fmcomms2_source_f32c_->set_rfdc(rf_dc_);
fmcomms2_source_f32c_->set_bbdc(bb_dc_);
fmcomms2_source_f32c_->set_filter_params(filter_source_, filter_filename_, Fpass_, Fstop_);
#else
fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make(
uri_.c_str(), freq_, sample_rate_,

View File

@ -61,7 +61,11 @@ public:
gr::basic_block_sptr get_right_block() override;
private:
#if GNURADIO_API_IIO
gr::iio::fmcomms2_source::sptr fmcomms2_source_f32c_;
#else
gr::iio::fmcomms2_source_f32c::sptr fmcomms2_source_f32c_;
#endif
gnss_shared_ptr<gr::block> valve_;
gr::blocks::file_sink::sptr file_sink_;

View File

@ -121,15 +121,20 @@ PlutosdrSignalSource::PlutosdrSignalSource(const ConfigurationInterface* configu
std::cout << "device address: " << uri_ << '\n';
std::cout << "frequency : " << freq_ << " Hz\n";
std::cout << "sample rate: " << sample_rate_ << " Hz\n";
std::cout << "sample rate: " << sample_rate_ << " Sps\n";
std::cout << "gain mode: " << gain_mode_ << '\n';
std::cout << "item type: " << item_type_ << '\n';
#if GNURADIO_API_IIO
plutosdr_source_ = gr::iio::pluto_source::make(uri_, freq_, sample_rate_,
bandwidth_, buffer_size_, quadrature_, rf_dc_, bb_dc_,
gain_mode_.c_str(), rf_gain_, filter_source_.c_str(),
filter_filename_.c_str(), Fpass_, Fstop_);
plutosdr_source_ = gr::iio::pluto_source::make(uri_, buffer_size_);
plutosdr_source_->set_frequency(freq_);
plutosdr_source_->set_samplerate(sample_rate_);
plutosdr_source_->set_gain_mode(gain_mode_);
plutosdr_source_->set_gain(rf_gain_);
plutosdr_source_->set_quadrature(quadrature_);
plutosdr_source_->set_rfdc(rf_dc_);
plutosdr_source_->set_bbdc(bb_dc_);
plutosdr_source_->set_filter_params(filter_source_, filter_filename_, Fpass_, Fstop_);
#else
plutosdr_source_ = gr::iio::pluto_source::make(uri_, freq_, sample_rate_,
bandwidth_, buffer_size_, quadrature_, rf_dc_, bb_dc_,

View File

@ -39,7 +39,7 @@ if(NOT benchmark_FOUND)
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/benchmark
BINARY_DIR ${CMAKE_BINARY_DIR}/benchmark-${GNSSSDR_BENCHMARK_LOCAL_VERSION}
CMAKE_ARGS ${BENCHMARK_COMPILER}
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF
-DBENCHMARK_ENABLE_TESTING=OFF
${BENCHMARK_TOOLCHAIN_ARG}
-DCMAKE_BUILD_TYPE=$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
BUILD_COMMAND "${BENCHMARK_BUILD_COMMAND} ${BENCHMARK_PARALLEL_BUILD}"