mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Merge branch 'blocking-false' into next
This commit is contained in:
commit
5c1f5bf315
@ -69,6 +69,8 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
|||||||
parameters for the `DataTypeAdapter`, `InputFilter` and `Resampler` blocks are
|
parameters for the `DataTypeAdapter`, `InputFilter` and `Resampler` blocks are
|
||||||
ignored. This was the default behavior in GNSS-SDR v0.0.12, but it changed in
|
ignored. This was the default behavior in GNSS-SDR v0.0.12, but it changed in
|
||||||
v0.0.13. This change recovers the old behavior.
|
v0.0.13. This change recovers the old behavior.
|
||||||
|
- Fixed occasional segmentation fault when exiting with `q` + `[Enter]` keys if
|
||||||
|
`Acquisition_XX.blocking=false`.
|
||||||
- Fixed the termination of the receiver with `q` + `[Enter]` keys when using the
|
- Fixed the termination of the receiver with `q` + `[Enter]` keys when using the
|
||||||
`Osmosdr_Signal_Source` implementation of the `SignalSource` block.
|
`Osmosdr_Signal_Source` implementation of the `SignalSource` block.
|
||||||
- The `Labsat_Signal_Source` implementation of the `SignalSource` block now can
|
- The `Labsat_Signal_Source` implementation of the `SignalSource` block now can
|
||||||
|
@ -659,8 +659,6 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
|||||||
<< ", doppler_step: " << d_doppler_step
|
<< ", doppler_step: " << d_doppler_step
|
||||||
<< ", use_CFAR_algorithm_flag: " << (d_use_CFAR_algorithm_flag ? "true" : "false");
|
<< ", use_CFAR_algorithm_flag: " << (d_use_CFAR_algorithm_flag ? "true" : "false");
|
||||||
|
|
||||||
lk.unlock();
|
|
||||||
|
|
||||||
// Doppler frequency grid loop
|
// Doppler frequency grid loop
|
||||||
if (!d_step_two)
|
if (!d_step_two)
|
||||||
{
|
{
|
||||||
@ -782,7 +780,6 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lk.lock();
|
|
||||||
if (!d_acq_parameters.bit_transition_flag)
|
if (!d_acq_parameters.bit_transition_flag)
|
||||||
{
|
{
|
||||||
if (d_test_statistics > d_threshold)
|
if (d_test_statistics > d_threshold)
|
||||||
@ -872,7 +869,6 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
|||||||
send_negative_acquisition();
|
send_negative_acquisition();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d_worker_active = false;
|
|
||||||
|
|
||||||
if ((d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells) or (d_positive_acq == 1))
|
if ((d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells) or (d_positive_acq == 1))
|
||||||
{
|
{
|
||||||
@ -884,6 +880,8 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
|||||||
d_num_noncoherent_integrations_counter = 0U;
|
d_num_noncoherent_integrations_counter = 0U;
|
||||||
d_positive_acq = 0;
|
d_positive_acq = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d_worker_active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -930,6 +928,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
|||||||
* 6. Declare positive or negative acquisition using a message port
|
* 6. Declare positive or negative acquisition using a message port
|
||||||
*/
|
*/
|
||||||
gr::thread::scoped_lock lk(d_setlock);
|
gr::thread::scoped_lock lk(d_setlock);
|
||||||
|
|
||||||
if (!d_active or d_worker_active)
|
if (!d_active or d_worker_active)
|
||||||
{
|
{
|
||||||
if (!d_acq_parameters.blocking_on_standby)
|
if (!d_acq_parameters.blocking_on_standby)
|
||||||
@ -1016,7 +1015,8 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
|
d_worker = std::thread([&] { pcps_acquisition::acquisition_core(d_sample_counter); });
|
||||||
|
d_worker.detach();
|
||||||
d_worker_active = true;
|
d_worker_active = true;
|
||||||
}
|
}
|
||||||
consume_each(0);
|
consume_each(0);
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <thread>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#if HAS_STD_SPAN
|
#if HAS_STD_SPAN
|
||||||
#include <span>
|
#include <span>
|
||||||
namespace own = std;
|
namespace own = std;
|
||||||
@ -259,6 +259,7 @@ private:
|
|||||||
arma::fmat d_narrow_grid;
|
arma::fmat d_narrow_grid;
|
||||||
|
|
||||||
std::string d_dump_filename;
|
std::string d_dump_filename;
|
||||||
|
std::thread d_worker;
|
||||||
|
|
||||||
int64_t d_dump_number;
|
int64_t d_dump_number;
|
||||||
uint64_t d_sample_counter;
|
uint64_t d_sample_counter;
|
||||||
|
Loading…
Reference in New Issue
Block a user