From 1931d2adb69d6fcc888a5edbd95c3fbc2f72095e Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 6 Jun 2018 12:26:45 +0200 Subject: [PATCH] Revert "Avoid reassignation of satellites" This reverts commit 84b2684337689c6b23520efc47dcb28959c15ebb. --- src/core/receiver/gnss_flowgraph.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index fc4ef9f0a..83ad6807a 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -775,9 +775,23 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) acq_channels_count_--; for (unsigned int i = 0; i < channels_count_; i++) { + unsigned int sat_ = 0; + try + { + sat_ = configuration_->property("Channel" + std::to_string(i) + ".satellite", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + } if (!available_GNSS_signals_.empty() && (acq_channels_count_ < max_acq_channels_) && (channels_state_[i] == 0)) { channels_state_[i] = 1; + if (sat_ == 0) + { + std::lock_guard lock(signal_list_mutex); + channels_[i]->set_signal(search_next_signal(channels_[i]->get_signal().get_signal_str(), true)); + } acq_channels_count_++; DLOG(INFO) << "Channel " << i << " Starting acquisition " << channels_[i]->get_signal().get_satellite() << ", Signal " << channels_[i]->get_signal().get_signal_str(); channels_[i]->start_acquisition();