From ba1a143094e11954c83cf08915bf68ad23b887d1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 15 Sep 2017 16:09:02 +0200 Subject: [PATCH] Minor fixes Avoid C-syle casts Always terminate case with break Consume ninput_items[0] if case=1 --- .../gnuradio_blocks/pcps_acquisition_cc.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc index b1dda44e0..814953973 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc @@ -401,10 +401,9 @@ int pcps_acquisition_cc::general_work(int noutput_items, d_new_data_available = true; d_cond.notify_one(); } - - consume_each(1); + consume_each(ninput_items[0]); } // if worker_active (else) - + break; } // case 1, switch d_state } // switch d_state @@ -442,13 +441,12 @@ void pcps_acquisition_cc::acquisition_core( void ) unsigned long int sample_counter = d_sample_counter; // sample counter d_well_count++; - DLOG(INFO)<< "Channel: " << d_channel + DLOG(INFO) << "Channel: " << d_channel << " , doing acquisition of satellite: " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN << " ,sample stamp: " << sample_counter << ", threshold: " << d_threshold << ", doppler_max: " << d_doppler_max << ", doppler_step: " << d_doppler_step - << ", use_CFAR_algorithm_flag: " << ( d_use_CFAR_algorithm_flag ? "true" : "false" ) - <get_outbuf(), n); //write directly |abs(x)|^2 in this Doppler bin? + d_dump_file.write(reinterpret_cast(d_ifft->get_outbuf()), n); //write directly |abs(x)|^2 in this Doppler bin? d_dump_file.close(); } }