mirror of https://github.com/gnss-sdr/gnss-sdr
Merge 1a6efcac0a
into b879549748
This commit is contained in:
commit
5498a67d89
|
@ -55,11 +55,13 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels,
|
|||
|
||||
void gnss_synchro_monitor::forecast(int noutput_items __attribute__((unused)), gr_vector_int& ninput_items_required)
|
||||
{
|
||||
for (int32_t channel_index = 0; channel_index < d_nchannels; channel_index++)
|
||||
for (int32_t channel_index = 0; channel_index < d_nchannels - 1; channel_index++)
|
||||
{
|
||||
// Set the required number of inputs to 0 so that a lone input on any channel can be pushed to UDP
|
||||
ninput_items_required[channel_index] = 0;
|
||||
}
|
||||
// last input channel is the sample counter, triggered each ms
|
||||
ninput_items_required[d_nchannels - 1] = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,7 +72,7 @@ int gnss_synchro_monitor::general_work(int noutput_items __attribute__((unused))
|
|||
const auto** in = reinterpret_cast<const Gnss_Synchro**>(&input_items[0]);
|
||||
|
||||
// Loop through each input stream channel
|
||||
for (int channel_index = 0; channel_index < d_nchannels; channel_index++)
|
||||
for (int channel_index = 0; channel_index < d_nchannels - 1; channel_index++)
|
||||
{
|
||||
// Loop through each item in each input stream channel
|
||||
int count = 0;
|
||||
|
@ -91,6 +93,7 @@ int gnss_synchro_monitor::general_work(int noutput_items __attribute__((unused))
|
|||
}
|
||||
}
|
||||
}
|
||||
consume(d_nchannels - 1, ninput_items[d_nchannels - 1]);
|
||||
|
||||
// Not producing any outputs
|
||||
return 0;
|
||||
|
|
|
@ -206,7 +206,8 @@ void GNSSFlowgraph::init()
|
|||
udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end());
|
||||
|
||||
// Instantiate monitor object
|
||||
GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_,
|
||||
// last input channel is the sample counter, triggered each ms
|
||||
GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_ + 1,
|
||||
configuration_->property("Monitor.decimation_factor", 1),
|
||||
configuration_->property("Monitor.udp_port", 1234),
|
||||
udp_addr_vec, enable_protobuf);
|
||||
|
@ -1217,6 +1218,7 @@ int GNSSFlowgraph::connect_gnss_synchro_monitor()
|
|||
{
|
||||
top_block_->connect(observables_->get_right_block(), i, GnssSynchroMonitor_, i);
|
||||
}
|
||||
top_block_->connect(ch_out_sample_counter_, 0, GnssSynchroMonitor_, channels_count_); // extra port for the sample counter pulse
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue