mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Build fix due to a change in the gr-iio v0.3 API
A change in the API has removed the decimation parameter from sources (see https://github.com/analogdevicesinc/gr-iio/issues/15 ) This commit fixes the build against the current master of https://github.com/analogdevicesinc/gr-iio but it breaks compatibility with older versions. Users with gr-iio already installed will need to update it.
This commit is contained in:
		| @@ -375,7 +375,7 @@ $ sudo make install | |||||||
|  |  | ||||||
| ###### Build FMCOMMS2 based SDR Hardware support (OPTIONAL): | ###### Build FMCOMMS2 based SDR Hardware support (OPTIONAL): | ||||||
|  |  | ||||||
| Install the [libiio](https://github.com/analogdevicesinc/libiio.git) (>=v0.11), [libad9361](https://github.com/analogdevicesinc/libad9361-iio.git) (>=v0.1-1) libraries and [gr-iio](https://github.com/analogdevicesinc/gr-iio.git) (>v0.2) gnuradio block: | Install the [libiio](https://github.com/analogdevicesinc/libiio.git) (>=v0.11), [libad9361](https://github.com/analogdevicesinc/libad9361-iio.git) (>=v0.1-1) libraries and [gr-iio](https://github.com/analogdevicesinc/gr-iio.git) (>v0.3) gnuradio block: | ||||||
|  |  | ||||||
| ~~~~~~ | ~~~~~~ | ||||||
| $ sudo apt-get install libxml2-dev bison flex | $ sudo apt-get install libxml2-dev bison flex | ||||||
|   | |||||||
| @@ -27,13 +27,11 @@ GNSS-SDR.SUPL_CI=0x31b0 | |||||||
|  |  | ||||||
| ;######### SIGNAL_SOURCE CONFIG ############ | ;######### SIGNAL_SOURCE CONFIG ############ | ||||||
| SignalSource.implementation=Fmcomms2_Signal_Source | SignalSource.implementation=Fmcomms2_Signal_Source | ||||||
| ;SignalSource.filename=/media/DATALOGGER_/signals/RTL-SDR/geo/pmt4.dat |  | ||||||
| SignalSource.item_type=gr_complex | SignalSource.item_type=gr_complex | ||||||
| SignalSource.device_address=10.42.0.196 | SignalSource.device_address=10.42.0.196 | ||||||
| SignalSource.sampling_frequency=2000000 | SignalSource.sampling_frequency=2000000 | ||||||
| SignalSource.freq=1575420000 | SignalSource.freq=1575420000 | ||||||
| SignalSource.bandwidth=2000000 | SignalSource.bandwidth=2000000 | ||||||
| SignalSource.decimation=0 |  | ||||||
| SignalSource.rx1_enable=true | SignalSource.rx1_enable=true | ||||||
| SignalSource.gain_mode_rx1=manual | SignalSource.gain_mode_rx1=manual | ||||||
| SignalSource.rf_port_select=A_BALANCED | SignalSource.rf_port_select=A_BALANCED | ||||||
|   | |||||||
| @@ -27,13 +27,11 @@ GNSS-SDR.SUPL_CI=0x31b0 | |||||||
|  |  | ||||||
| ;######### SIGNAL_SOURCE CONFIG ############ | ;######### SIGNAL_SOURCE CONFIG ############ | ||||||
| SignalSource.implementation=Plutosdr_Signal_Source | SignalSource.implementation=Plutosdr_Signal_Source | ||||||
| ;SignalSource.filename=/media/DATALOGGER_/signals/RTL-SDR/geo/pmt4.dat |  | ||||||
| SignalSource.item_type=gr_complex | SignalSource.item_type=gr_complex | ||||||
| SignalSource.device_address=192.168.2.1 | SignalSource.device_address=192.168.2.1 | ||||||
| SignalSource.sampling_frequency=3000000 | SignalSource.sampling_frequency=3000000 | ||||||
| SignalSource.freq=1575420000 | SignalSource.freq=1575420000 | ||||||
| SignalSource.bandwidth=2600000 | SignalSource.bandwidth=2600000 | ||||||
| SignalSource.decimation=0 |  | ||||||
| SignalSource.gain_mode=manual | SignalSource.gain_mode=manual | ||||||
| SignalSource.gain=30 | SignalSource.gain=30 | ||||||
| SignalSource.samples=0 | SignalSource.samples=0 | ||||||
|   | |||||||
| @@ -53,7 +53,6 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration | |||||||
|     rx1_en_ = configuration->property(role + ".rx1_enable", true); |     rx1_en_ = configuration->property(role + ".rx1_enable", true); | ||||||
|     rx2_en_ = configuration->property(role + ".rx2_enable", false); |     rx2_en_ = configuration->property(role + ".rx2_enable", false); | ||||||
|     buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000); |     buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000); | ||||||
|     decimation_ = configuration->property(role + ".decimation", 1); |  | ||||||
|     quadrature_ = configuration->property(role + ".quadrature", true); |     quadrature_ = configuration->property(role + ".quadrature", true); | ||||||
|     rf_dc_ = configuration->property(role + ".rf_dc", true); |     rf_dc_ = configuration->property(role + ".rf_dc", true); | ||||||
|     bb_dc_ = configuration->property(role + ".bb_dc", true); |     bb_dc_ = configuration->property(role + ".bb_dc", true); | ||||||
| @@ -79,7 +78,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration | |||||||
|         { |         { | ||||||
|             fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make( |             fmcomms2_source_f32c_ = gr::iio::fmcomms2_source_f32c::make( | ||||||
|                     uri_.c_str(), freq_, sample_rate_, |                     uri_.c_str(), freq_, sample_rate_, | ||||||
|                     decimation_, bandwidth_, |                     bandwidth_, | ||||||
|                     rx1_en_, rx2_en_, |                     rx1_en_, rx2_en_, | ||||||
|                     buffer_size_, quadrature_, rf_dc_, |                     buffer_size_, quadrature_, rf_dc_, | ||||||
|                     bb_dc_, gain_mode_rx1_.c_str(), rf_gain_rx1_, |                     bb_dc_, gain_mode_rx1_.c_str(), rf_gain_rx1_, | ||||||
|   | |||||||
| @@ -83,7 +83,6 @@ private: | |||||||
|     unsigned long sample_rate_; |     unsigned long sample_rate_; | ||||||
|     unsigned long bandwidth_; |     unsigned long bandwidth_; | ||||||
|     unsigned long buffer_size_; //reception buffer |     unsigned long buffer_size_; //reception buffer | ||||||
|     unsigned int decimation_; |  | ||||||
|     bool rx1_en_; |     bool rx1_en_; | ||||||
|     bool rx2_en_; |     bool rx2_en_; | ||||||
|     bool quadrature_; |     bool quadrature_; | ||||||
|   | |||||||
| @@ -52,7 +52,6 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration | |||||||
|     sample_rate_ = configuration->property(role + ".sampling_frequency", 3000000); |     sample_rate_ = configuration->property(role + ".sampling_frequency", 3000000); | ||||||
|     bandwidth_ = configuration->property(role + ".bandwidth", 2000000); |     bandwidth_ = configuration->property(role + ".bandwidth", 2000000); | ||||||
|     buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000); |     buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000); | ||||||
|     decimation_ = configuration->property(role + ".decimation", 1); |  | ||||||
|     quadrature_ = configuration->property(role + ".quadrature", true); |     quadrature_ = configuration->property(role + ".quadrature", true); | ||||||
|     rf_dc_ = configuration->property(role + ".rf_dc", true); |     rf_dc_ = configuration->property(role + ".rf_dc", true); | ||||||
|     bb_dc_ = configuration->property(role + ".bb_dc", true); |     bb_dc_ = configuration->property(role + ".bb_dc", true); | ||||||
| @@ -81,7 +80,7 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration | |||||||
|     std::cout << "item type: " << item_type_ << std::endl; |     std::cout << "item type: " << item_type_ << std::endl; | ||||||
|  |  | ||||||
|     plutosdr_source_ = gr::iio::pluto_source::make(uri_, freq_, sample_rate_, |     plutosdr_source_ = gr::iio::pluto_source::make(uri_, freq_, sample_rate_, | ||||||
|             decimation_, bandwidth_, buffer_size_, quadrature_, rf_dc_, bb_dc_, |             bandwidth_, buffer_size_, quadrature_, rf_dc_, bb_dc_, | ||||||
|             gain_mode_.c_str(), rf_gain_,filter_file_.c_str(), filter_auto_); |             gain_mode_.c_str(), rf_gain_,filter_file_.c_str(), filter_auto_); | ||||||
|  |  | ||||||
|     if (samples_ != 0) |     if (samples_ != 0) | ||||||
|   | |||||||
| @@ -83,7 +83,6 @@ private: | |||||||
|     unsigned long sample_rate_; |     unsigned long sample_rate_; | ||||||
|     unsigned long bandwidth_; |     unsigned long bandwidth_; | ||||||
|     unsigned long buffer_size_; // reception buffer |     unsigned long buffer_size_; // reception buffer | ||||||
|     unsigned int decimation_; |  | ||||||
|     bool quadrature_; |     bool quadrature_; | ||||||
|     bool rf_dc_; |     bool rf_dc_; | ||||||
|     bool bb_dc_; |     bool bb_dc_; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez