From c8c46bc3c589a1457d84a515cee2b33e1e49c5e2 Mon Sep 17 00:00:00 2001 From: Xavier Guerrero-Pau Date: Thu, 8 Aug 2024 12:03:46 +0200 Subject: [PATCH] Moved decimation factor count variable to the class --- .gitignore | 7 +++++++ src/algorithms/signal_source/libs/ad936x_iio_custom.cc | 8 +++++--- src/core/monitor/gnss_synchro_monitor.cc | 2 +- src/core/monitor/gnss_synchro_monitor.h | 3 ++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 007b9ab0c..a876bf1c1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,10 @@ cmake-build-debug/ .vscode/ .vs/ Testing/ + +GSDR* +PVT_* +HAS_* +gnss_sdr_pvt.nmea +build-debug/ +build-release/ \ No newline at end of file diff --git a/src/algorithms/signal_source/libs/ad936x_iio_custom.cc b/src/algorithms/signal_source/libs/ad936x_iio_custom.cc index 2869081f2..2ad41edfc 100644 --- a/src/algorithms/signal_source/libs/ad936x_iio_custom.cc +++ b/src/algorithms/signal_source/libs/ad936x_iio_custom.cc @@ -22,6 +22,7 @@ #include #include #include +#include "display.h" #if USE_GLOG_AND_GFLAGS #include @@ -849,11 +850,12 @@ void ad936x_iio_custom::monitor_thread_fn() // } else { if (val & 4) { - std::cout << "WARNING: IIO status register reported overflow!\n"; - LOG(INFO) << "WARNING: IIO status register reported overflow!"; + std::cout + << TEXT_BOLD_RED + << "WARNING: IIO status register reported overflow!\n"; + LOG(WARNING) << "WARNING: IIO status register reported overflow!"; } - /* Clear bits */ if (val) { diff --git a/src/core/monitor/gnss_synchro_monitor.cc b/src/core/monitor/gnss_synchro_monitor.cc index 502a5ed48..d5e95d623 100644 --- a/src/core/monitor/gnss_synchro_monitor.cc +++ b/src/core/monitor/gnss_synchro_monitor.cc @@ -50,6 +50,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels, d_decimation_factor(decimation_factor) { udp_sink_ptr = std::make_unique(udp_addresses, udp_port, enable_protobuf); + count = 0; } @@ -73,7 +74,6 @@ int gnss_synchro_monitor::general_work(int noutput_items __attribute__((unused)) for (int channel_index = 0; channel_index < d_nchannels; channel_index++) { // Loop through each item in each input stream channel - int count = 0; for (int item_index = 0; item_index < ninput_items[channel_index]; item_index++) { // Use the count variable to limit how many items are sent per channel diff --git a/src/core/monitor/gnss_synchro_monitor.h b/src/core/monitor/gnss_synchro_monitor.h index b45b7cc5b..64749a001 100644 --- a/src/core/monitor/gnss_synchro_monitor.h +++ b/src/core/monitor/gnss_synchro_monitor.h @@ -71,9 +71,10 @@ private: const std::vector& udp_addresses, bool enable_protobuf); + std::unique_ptr udp_sink_ptr; + int count; int d_nchannels; int d_decimation_factor; - std::unique_ptr udp_sink_ptr; };