mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
eliminate compile warning
Note this commit introduces a more appropriate pattern for exception handling within loops, but did not change all occurrences.
This commit is contained in:
parent
a3c9dd4325
commit
6d4ddc16e7
@ -110,7 +110,7 @@ void GNSSFlowgraph::init()
|
||||
auto& src = sig_source_.back();
|
||||
auto RF_Channels = src->getRfChannels();
|
||||
std::cout << "RF Channels " << RF_Channels << '\n';
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
for (auto j = 0u; j < RF_Channels; ++j)
|
||||
{
|
||||
sig_conditioner_.push_back(block_factory->GetSignalConditioner(configuration_.get(), signal_conditioner_ID));
|
||||
signal_conditioner_ID++;
|
||||
@ -691,12 +691,16 @@ int GNSSFlowgraph::disconnect_signal_sources()
|
||||
|
||||
int GNSSFlowgraph::connect_signal_conditioners()
|
||||
{
|
||||
for (auto& sig : sig_conditioner_)
|
||||
{
|
||||
int error = 1; // this should be bool (true)
|
||||
try
|
||||
{
|
||||
for (auto& sig : sig_conditioner_)
|
||||
{
|
||||
sig->connect(top_block_);
|
||||
}
|
||||
DLOG(INFO) << "Signal Conditioner blocks successfully connected to the top_block";
|
||||
error = 0; // false
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(ERROR) << "Can't connect signal conditioner block internally: " << e.what();
|
||||
@ -745,11 +749,8 @@ int GNSSFlowgraph::connect_signal_conditioners()
|
||||
}
|
||||
help_hint_ += " Check the Resampler documentation at https://gnss-sdr.org/docs/sp-blocks/resampler/\n";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
DLOG(INFO) << "Signal Conditioner blocks successfully connected to the top_block";
|
||||
return 0;
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@ -1021,7 +1022,7 @@ int GNSSFlowgraph::connect_signal_sources_to_signal_conditioners()
|
||||
{
|
||||
auto RF_Channels = src->getRfChannels();
|
||||
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
for (auto j = 0u; j < RF_Channels; ++j)
|
||||
{
|
||||
// Connect the multichannel signal source to multiple signal conditioners
|
||||
// GNURADIO max_streams=-1 means infinite ports!
|
||||
@ -1116,7 +1117,7 @@ int GNSSFlowgraph::disconnect_signal_sources_from_signal_conditioners()
|
||||
{
|
||||
auto RF_Channels = src->getRfChannels();
|
||||
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
for (auto j = 0u; j < RF_Channels; ++j)
|
||||
{
|
||||
if (src->get_right_block()->output_signature()->max_streams() > 1 or src->get_right_block()->output_signature()->max_streams() == -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user