1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-11 04:20:03 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga_signal_sources

This commit is contained in:
Marc Majoral 2024-08-10 15:29:40 +02:00
commit 0242f86088
No known key found for this signature in database
GPG Key ID: 9D82A95A8E140375

View File

@ -125,13 +125,7 @@ void GNSSFlowgraph::init()
sources_count_ = configuration_->property("GNSS-SDR.num_sources", sources_count_deprecated); sources_count_ = configuration_->property("GNSS-SDR.num_sources", sources_count_deprecated);
// Avoid segmentation fault caused by wrong configuration // Avoid segmentation fault caused by wrong configuration
auto check_not_nullptr = block_factory->GetSignalSource(configuration_.get(), queue_.get(), 0); if (sources_count_ == 2 && configuration_->property("SignalSource.implementation", std::string("")) == "Multichannel_File_Signal_Source")
if (!check_not_nullptr)
{
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
if (sources_count_ == 2 && check_not_nullptr->implementation() == "Multichannel_File_Signal_Source")
{ {
std::cout << " * Please set GNSS-SDR.num_sources=1 in your configuration file\n"; std::cout << " * Please set GNSS-SDR.num_sources=1 in your configuration file\n";
std::cout << " if you are using the Multichannel_File_Signal_Source implementation.\n"; std::cout << " if you are using the Multichannel_File_Signal_Source implementation.\n";
@ -143,7 +137,13 @@ void GNSSFlowgraph::init()
for (int i = 0; i < sources_count_; i++) for (int i = 0; i < sources_count_; i++)
{ {
DLOG(INFO) << "Creating source " << i; DLOG(INFO) << "Creating source " << i;
sig_source_.push_back(block_factory->GetSignalSource(configuration_.get(), queue_.get(), i)); auto check_not_nullptr = block_factory->GetSignalSource(configuration_.get(), queue_.get(), i);
if (!check_not_nullptr)
{
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
sig_source_.push_back(std::move(check_not_nullptr));
if (enable_fpga_offloading_ == false) if (enable_fpga_offloading_ == false)
{ {
auto& src = sig_source_.back(); auto& src = sig_source_.back();