1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-31 19:29:17 +00:00

Stop receiver if no channels have been assigned

This commit is contained in:
Carles Fernandez 2021-08-11 19:01:09 +02:00
parent 18005c6ca8
commit e2efc7e9f1
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -785,6 +785,15 @@ int GNSSFlowgraph::disconnect_signal_conditioners()
int GNSSFlowgraph::connect_channels() int GNSSFlowgraph::connect_channels()
{ {
if (channels_count_ <= 0)
{
LOG(ERROR) << "No channels have been assigned.";
help_hint_ += " * No channels have been assigned, check your configuration file.\n";
help_hint_ += " At least one of the Channels_XX.count must be > 0.\n";
help_hint_ += " Channels documentation at https://gnss-sdr.org/docs/sp-blocks/channels/\n";
top_block_->disconnect_all();
return 1;
}
for (int i = 0; i < channels_count_; i++) for (int i = 0; i < channels_count_; i++)
{ {
if (channels_.at(i) != nullptr) if (channels_.at(i) != nullptr)