1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-21 03:39:48 +00:00

Moved decimation factor count variable to the class

This commit is contained in:
Xavier Guerrero-Pau 2024-08-08 12:03:46 +02:00
parent 9ffb7e2dc8
commit c8c46bc3c5
No known key found for this signature in database
GPG Key ID: 0CB01876EFF7510B
4 changed files with 15 additions and 5 deletions

7
.gitignore vendored
View File

@ -20,3 +20,10 @@ cmake-build-debug/
.vscode/ .vscode/
.vs/ .vs/
Testing/ Testing/
GSDR*
PVT_*
HAS_*
gnss_sdr_pvt.nmea
build-debug/
build-release/

View File

@ -22,6 +22,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "display.h"
#if USE_GLOG_AND_GFLAGS #if USE_GLOG_AND_GFLAGS
#include <glog/logging.h> #include <glog/logging.h>
@ -849,11 +850,12 @@ void ad936x_iio_custom::monitor_thread_fn()
// } else { // } else {
if (val & 4) if (val & 4)
{ {
std::cout << "WARNING: IIO status register reported overflow!\n"; std::cout
LOG(INFO) << "WARNING: IIO status register reported overflow!"; << TEXT_BOLD_RED
<< "WARNING: IIO status register reported overflow!\n";
LOG(WARNING) << "WARNING: IIO status register reported overflow!";
} }
/* Clear bits */ /* Clear bits */
if (val) if (val)
{ {

View File

@ -50,6 +50,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels,
d_decimation_factor(decimation_factor) d_decimation_factor(decimation_factor)
{ {
udp_sink_ptr = std::make_unique<Gnss_Synchro_Udp_Sink>(udp_addresses, udp_port, enable_protobuf); udp_sink_ptr = std::make_unique<Gnss_Synchro_Udp_Sink>(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++) for (int channel_index = 0; channel_index < d_nchannels; channel_index++)
{ {
// Loop through each item in each input stream channel // 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++) 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 // Use the count variable to limit how many items are sent per channel

View File

@ -71,9 +71,10 @@ private:
const std::vector<std::string>& udp_addresses, const std::vector<std::string>& udp_addresses,
bool enable_protobuf); bool enable_protobuf);
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
int count;
int d_nchannels; int d_nchannels;
int d_decimation_factor; int d_decimation_factor;
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
}; };