Merge branch 'next' into agpl_next

master
Codebot 3 years ago committed by Your Name
commit f82282a967

@ -25,7 +25,6 @@ if(NOT SOAPYSDR_FOUND)
find_path(SOAPYSDR_INCLUDE_DIRS find_path(SOAPYSDR_INCLUDE_DIRS
NAMES Device.h NAMES Device.h
HINTS $ENV{SOAPY_DIR}/include HINTS $ENV{SOAPY_DIR}/include
$ENV{SOAPY_DIR}/include/SoapySDR
PATHS ${SOAPYSDR_PKG_INCLUDE_DIRS} PATHS ${SOAPYSDR_PKG_INCLUDE_DIRS}
/usr/include/SoapySDR /usr/include/SoapySDR
/usr/local/include/SoapySDR /usr/local/include/SoapySDR

@ -263,7 +263,7 @@ public:
std::copy(it + 1, end(), it); std::copy(it + 1, end(), it);
size_--; size_--;
return it + 1; return it;
} }
bool operator==(const dyn_array<T>& other) const bool operator==(const dyn_array<T>& other) const
{ {

@ -65,6 +65,7 @@ static pthread_t radio_thread;
#include "srsgui/srsgui.h" #include "srsgui/srsgui.h"
#include <semaphore.h> #include <semaphore.h>
static pthread_t plot_thread; static pthread_t plot_thread;
static bool plot_thread_launched = false;
static sem_t plot_sem; static sem_t plot_sem;
static uint32_t plot_sf_idx = 0; static uint32_t plot_sf_idx = 0;
static plot_real_t fft_plot[SRSRAN_MAX_RADIOS] = {}; static plot_real_t fft_plot[SRSRAN_MAX_RADIOS] = {};
@ -256,6 +257,7 @@ static int init_plots(uint32_t frame_size)
perror("pthread_create"); perror("pthread_create");
exit(-1); exit(-1);
} }
plot_thread_launched = true;
return SRSRAN_SUCCESS; return SRSRAN_SUCCESS;
} }
@ -324,7 +326,10 @@ static void* radio_thread_run(void* arg)
#ifdef ENABLE_GUI #ifdef ENABLE_GUI
if (fft_plot_enable) { if (fft_plot_enable) {
init_plots(frame_size); if (init_plots(frame_size) != SRSRAN_SUCCESS) {
ERROR("Error: Could not init plots");
goto clean_exit;
}
sleep(1); sleep(1);
} }
#endif /* ENABLE_GUI */ #endif /* ENABLE_GUI */
@ -583,7 +588,10 @@ clean_exit:
srsran_dft_plan_free(&idft_plan); srsran_dft_plan_free(&idft_plan);
#ifdef ENABLE_GUI #ifdef ENABLE_GUI
if (fft_plot_enable) {
if (plot_thread_launched == true) {
pthread_join(plot_thread, NULL); pthread_join(plot_thread, NULL);
}
srsran_dft_plan_free(&dft_spectrum); srsran_dft_plan_free(&dft_spectrum);
for (uint32_t r = 0; r < nof_radios; r++) { for (uint32_t r = 0; r < nof_radios; r++) {
for (uint32_t p = 0; p < nof_ports; p++) { for (uint32_t p = 0; p < nof_ports; p++) {
@ -596,6 +604,7 @@ clean_exit:
if (fft_plot_temp) { if (fft_plot_temp) {
free(fft_plot_temp); free(fft_plot_temp);
} }
}
#endif /* ENABLE_GUI */ #endif /* ENABLE_GUI */
if (ret) { if (ret) {

@ -434,8 +434,7 @@ bool apply_meascfg_updates(meas_cfg_s& meascfg,
for (auto it = current_meascfg.meas_id_to_add_mod_list.begin(); for (auto it = current_meascfg.meas_id_to_add_mod_list.begin();
it != current_meascfg.meas_id_to_add_mod_list.end();) { it != current_meascfg.meas_id_to_add_mod_list.end();) {
if (it->meas_obj_id == found_src_obj->meas_obj_id) { if (it->meas_obj_id == found_src_obj->meas_obj_id) {
auto rit = it++; it = current_meascfg.meas_id_to_add_mod_list.erase(it);
current_meascfg.meas_id_to_add_mod_list.erase(rit);
} else { } else {
++it; ++it;
} }

Loading…
Cancel
Save