From 173b6c7d8af7434d21fc9512bae03da09949e8e0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 12 Oct 2017 19:15:44 +0200 Subject: [PATCH] Pass Gnns_Satellite object by reference instead of by value --- .../gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc | 4 ++-- .../gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc index 4dbccde7a..2077ba4ab 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc @@ -109,7 +109,7 @@ void galileo_e5a_telemetry_decoder_cc::deinterleaver(int rows, int cols, double } -void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols,int frame_length) +void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols, int frame_length) { double page_symbols_deint[frame_length]; // 1. De-interleave @@ -530,7 +530,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut } -void galileo_e5a_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite) +void galileo_e5a_telemetry_decoder_cc::set_satellite(const Gnss_Satellite & satellite) { d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h index 2389bfb2e..46620a86e 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.h @@ -66,8 +66,8 @@ class galileo_e5a_telemetry_decoder_cc : public gr::block { public: ~galileo_e5a_telemetry_decoder_cc(); - void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN - void set_channel(int channel); //!< Set receiver's channel + void set_satellite(const Gnss_Satellite & satellite); //!< Set satellite PRN + void set_channel(int channel); //!< Set receiver's channel /*! * \brief This is where all signal processing takes place */ @@ -83,13 +83,11 @@ private: void deinterleaver(int rows, int cols, double *in, double *out); - void decode_word(double *page_symbols,int frame_length); + void decode_word(double *page_symbols, int frame_length); int d_preamble_bits[GALILEO_FNAV_PREAMBLE_LENGTH_BITS]; - // signed int d_page_symbols[GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS]; double d_page_symbols[GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS]; - // signed int *d_preamble_symbols; double d_current_symbol; long unsigned int d_symbol_counter; int d_prompt_counter;