summarylogtreecommitdiffstats
path: root/0001-several-fixes.patch
blob: 5d50e92abb4361b093a996955ee8799c99282b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287

---
 CMakeLists.txt                        | 1 -
 grc/CMakeLists.txt                    | 2 +-
 grc/iio_attr_sink.block.yml           | 2 +-
 grc/iio_attr_source.block.yml         | 2 +-
 grc/iio_attr_updater.block.yml        | 2 +-
 grc/iio_device_sink.block.yml         | 2 +-
 grc/iio_device_source.block.yml       | 2 +-
 grc/iio_fmcomms2_sink.block.yml       | 2 +-
 grc/iio_fmcomms2_source.block.yml     | 2 +-
 grc/iio_fmcomms5_sink.block.yml       | 2 +-
 grc/iio_fmcomms5_source.block.yml     | 2 +-
 grc/iio_pluto_sink.block.yml          | 2 +-
 grc/iio_pluto_source.block.yml        | 2 +-
 iio-examples/cyclic-sine_pluto.grc    | 4 ++--
 iio-examples/fm-transmitter_pluto.grc | 2 +-
 iio-examples/fmradio_pluto.grc        | 2 +-
 lib/attr_source_impl.cc               | 6 +++---
 python/CMakeLists.txt                 | 2 +-
 swig/CMakeLists.txt                   | 2 +-
 19 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8342d0..2e94de3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,7 +107,6 @@ set(GR_PKG_DATA_DIR     ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME})
 set(GR_PKG_DOC_DIR      ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME})
 set(GR_PKG_CONF_DIR     ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d)
 set(GR_PKG_LIBEXEC_DIR  ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
-set(GRC_BLOCKS_DIR      ${GR_PKG_DATA_DIR}/grc/blocks)
 
 ########################################################################
 # Find gnuradio build dependencies
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index bcb549d..6246c27 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -18,4 +18,4 @@
 # Boston, MA 02110-1301, USA.
 
 file(GLOB yml_files "*.yml")
-install(FILES ${yml_files} DESTINATION ${GRC_BLOCKS_DIR})
+install(FILES ${yml_files} DESTINATION share/gnuradio/grc/blocks)
diff --git a/grc/iio_attr_sink.block.yml b/grc/iio_attr_sink.block.yml
index 9320b49..f093511 100644
--- a/grc/iio_attr_sink.block.yml
+++ b/grc/iio_attr_sink.block.yml
@@ -44,7 +44,7 @@ inputs:
     id: attr
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.attr_sink(${uri}, ${device}, ${channel}, ${attr_type}, ${output}, ${required_enable})
 
 documentation: https://wiki.analog.com/resources/tools-software/linux-software/gnuradio
diff --git a/grc/iio_attr_source.block.yml b/grc/iio_attr_source.block.yml
index d7afc7d..ec04835 100644
--- a/grc/iio_attr_source.block.yml
+++ b/grc/iio_attr_source.block.yml
@@ -77,7 +77,7 @@ outputs:
     dtype: ${ type.fcn }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.attr_source(${uri}, ${device}, ${channel}, ${attribute}, ${update_interval_ms}, ${samples_per_update}, ${type}, ${attr_type}, ${output}, ${address}, ${required_enable})
 
 documentation: https://wiki.analog.com/resources/tools-software/linux-software/gnuradio
diff --git a/grc/iio_attr_updater.block.yml b/grc/iio_attr_updater.block.yml
index 22918e5..19df8fa 100644
--- a/grc/iio_attr_updater.block.yml
+++ b/grc/iio_attr_updater.block.yml
@@ -23,7 +23,7 @@ outputs:
     id: out
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.attr_updater(${attr}, ${value}, ${update_interval_ms})
     callbacks:
       - update_value(${value})
diff --git a/grc/iio_device_sink.block.yml b/grc/iio_device_sink.block.yml
index abcd504..d8fdbdc 100644
--- a/grc/iio_device_sink.block.yml
+++ b/grc/iio_device_sink.block.yml
@@ -52,7 +52,7 @@ asserts:
 - ${ len(channels) > 0 }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.device_sink(${uri}, ${device}, ${channels}, ${device_phy}, ${params}, ${buffer_size}, ${interpolation} - 1, ${cyclic})
 
 file_format: 1
diff --git a/grc/iio_device_source.block.yml b/grc/iio_device_source.block.yml
index ea6af88..5977878 100644
--- a/grc/iio_device_source.block.yml
+++ b/grc/iio_device_source.block.yml
@@ -45,7 +45,7 @@ outputs:
     optional: true
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.device_source(${uri}, ${device}, ${channels}, ${device_phy}, ${params}, ${buffer_size}, ${decimation} - 1)
 
 file_format: 1
diff --git a/grc/iio_fmcomms2_sink.block.yml b/grc/iio_fmcomms2_sink.block.yml
index 4197f11..87ccb2b 100644
--- a/grc/iio_fmcomms2_sink.block.yml
+++ b/grc/iio_fmcomms2_sink.block.yml
@@ -93,7 +93,7 @@ asserts:
 - ${ ((frequency<=6000000000) and (frequency>=47000000)) }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.fmcomms2_sink_f32c(${uri}, ${frequency}, ${samplerate}, ${bandwidth}, ${tx1_en}, ${tx2_en}, ${buffer_size}, ${cyclic}, ${rf_port_select}, ${attenuation1}, ${attenuation2}, ${filter}, ${auto_filter})
     callbacks:
       - set_params(${frequency}, ${samplerate}, ${bandwidth}, ${rf_port_select}, ${attenuation1}, ${attenuation2}, ${filter}, ${auto_filter})
diff --git a/grc/iio_fmcomms2_source.block.yml b/grc/iio_fmcomms2_source.block.yml
index 7a3559e..efa5b08 100644
--- a/grc/iio_fmcomms2_source.block.yml
+++ b/grc/iio_fmcomms2_source.block.yml
@@ -124,7 +124,7 @@ asserts:
 - ${ ((frequency<=6000000000) and (frequency>=70000000)) }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.fmcomms2_source_f32c(${uri}, ${frequency}, ${samplerate}, ${bandwidth}, ${rx1_en}, ${rx2_en}, ${buffer_size}, ${quadrature}, ${rfdc}, ${bbdc}, ${gain1}, ${manual_gain1}, ${gain2}, ${manual_gain2}, ${rf_port_select}, ${filter}, ${auto_filter})
     callbacks:
       - set_params(${frequency}, ${samplerate}, ${bandwidth}, ${quadrature}, ${rfdc}, ${bbdc}, ${gain1}, ${manual_gain1}, ${gain2}, ${manual_gain2}, ${rf_port_select}, ${filter}, ${auto_filter})
diff --git a/grc/iio_fmcomms5_sink.block.yml b/grc/iio_fmcomms5_sink.block.yml
index 7d00f3d..d9fce98 100644
--- a/grc/iio_fmcomms5_sink.block.yml
+++ b/grc/iio_fmcomms5_sink.block.yml
@@ -118,7 +118,7 @@ asserts:
 - ${ ((frequency2<=6000000000) and (frequency2>=47000000)) }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.fmcomms5_sink_f32c(${uri}, ${frequency1}, ${frequency2}, ${samplerate}, ${bandwidth}, ${tx1_en}, ${tx2_en}, ${tx3_en}, ${tx4_en}, ${buffer_size}, ${cyclic}, ${rf_port_select}, ${attenuation1}, ${attenuation2}, ${attenuation3}, ${attenuation4}, ${filter})
     callbacks:
     - set_params(${frequency1}, ${frequency2}, ${samplerate}, ${bandwidth}, ${rf_port_select}, ${attenuation1}, ${attenuation2}, ${attenuation3}, ${attenuation4})
diff --git a/grc/iio_fmcomms5_source.block.yml b/grc/iio_fmcomms5_source.block.yml
index c12650d..12c5235 100644
--- a/grc/iio_fmcomms5_source.block.yml
+++ b/grc/iio_fmcomms5_source.block.yml
@@ -165,7 +165,7 @@ asserts:
 - ${ ((frequency2<=6000000000) and (frequency2>=70000000)) }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.fmcomms5_source_f32c(${uri}, ${frequency1}, ${frequency2}, ${samplerate}, ${bandwidth}, ${rx1_en}, ${rx2_en}, ${rx3_en}, ${rx4_en}, ${buffer_size}, ${quadrature}, ${rfdc}, ${bbdc}, ${gain1}, ${manual_gain1}, ${gain2}, ${manual_gain2}, ${gain3}, ${manual_gain3}, ${gain4}, ${manual_gain4}, ${rf_port_select}, ${filter})
     callbacks:
     - set_params(${frequency1}, ${frequency2}, ${samplerate}, ${bandwidth}, ${quadrature}, ${rfdc}, ${bbdc}, ${gain1}, ${manual_gain1}, ${gain2}, ${manual_gain2}, ${gain3}, ${manual_gain3}, ${gain4}, ${manual_gain4}, ${rf_port_select})
diff --git a/grc/iio_pluto_sink.block.yml b/grc/iio_pluto_sink.block.yml
index 464598c..0a4e29e 100644
--- a/grc/iio_pluto_sink.block.yml
+++ b/grc/iio_pluto_sink.block.yml
@@ -63,7 +63,7 @@ asserts:
 - ${ ((frequency<=6000000000) and (frequency>=47000000)) }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.pluto_sink(${uri}, ${frequency}, ${samplerate}, ${bandwidth}, ${buffer_size}, ${cyclic}, ${attenuation1}, ${filter}, ${auto_filter})
     callbacks:
       - set_params(${frequency}, ${samplerate}, ${bandwidth}, ${attenuation1}, ${filter}, ${auto_filter})
diff --git a/grc/iio_pluto_source.block.yml b/grc/iio_pluto_source.block.yml
index c785eac..ce63a5c 100644
--- a/grc/iio_pluto_source.block.yml
+++ b/grc/iio_pluto_source.block.yml
@@ -85,7 +85,7 @@ asserts:
 - ${ ((frequency<=6000000000) and (frequency>=70000000)) }
 
 templates:
-    imports: import iio
+    imports: from gnuradio import iio
     make: iio.pluto_source(${uri}, ${frequency}, ${samplerate}, ${bandwidth}, ${buffer_size}, ${quadrature}, ${rfdc}, ${bbdc}, ${gain1}, ${manual_gain1}, ${filter}, ${auto_filter})
     callbacks:
       - set_params(${frequency}, ${samplerate}, ${bandwidth}, ${quadrature}, ${rfdc}, ${bbdc}, ${gain1}, ${manual_gain1}, ${filter}, ${auto_filter})
diff --git a/iio-examples/cyclic-sine_pluto.grc b/iio-examples/cyclic-sine_pluto.grc
index 028287a..88eadcb 100644
--- a/iio-examples/cyclic-sine_pluto.grc
+++ b/iio-examples/cyclic-sine_pluto.grc
@@ -199,7 +199,7 @@
     </param>
   </block>
   <block>
-    <key>pluto_sink</key>
+    <key>iio_pluto_sink</key>
     <param>
       <key>attenuation</key>
       <value>10.0</value>
@@ -266,7 +266,7 @@
     </param>
   </block>
   <block>
-    <key>pluto_source</key>
+    <key>iio_pluto_source</key>
     <param>
       <key>bbdc</key>
       <value>True</value>
diff --git a/iio-examples/fm-transmitter_pluto.grc b/iio-examples/fm-transmitter_pluto.grc
index 07aa453..0c06d6e 100644
--- a/iio-examples/fm-transmitter_pluto.grc
+++ b/iio-examples/fm-transmitter_pluto.grc
@@ -340,7 +340,7 @@
     </param>
   </block>
   <block>
-    <key>pluto_sink</key>
+    <key>iio_pluto_sink</key>
     <param>
       <key>attenuation</key>
       <value>10.0</value>
diff --git a/iio-examples/fmradio_pluto.grc b/iio-examples/fmradio_pluto.grc
index f4b7634..1f9b27e 100644
--- a/iio-examples/fmradio_pluto.grc
+++ b/iio-examples/fmradio_pluto.grc
@@ -450,7 +450,7 @@
     </param>
   </block>
   <block>
-    <key>pluto_source</key>
+    <key>iio_pluto_source</key>
     <param>
       <key>bbdc</key>
       <value>True</value>
diff --git a/lib/attr_source_impl.cc b/lib/attr_source_impl.cc
index 5633cb1..f46c400 100644
--- a/lib/attr_source_impl.cc
+++ b/lib/attr_source_impl.cc
@@ -26,8 +26,8 @@
 #include <gnuradio/io_signature.h>
 #include "attr_source_impl.h"
 #include <boost/lexical_cast.hpp>
-#include <boost/chrono.hpp>
-#include <boost/thread/thread.hpp>
+#include <chrono>
+#include <thread>
 #include <vector>
 
 
@@ -255,7 +255,7 @@ namespace gr {
 
       for (sample = 0; sample<samples_per_update; sample++)
       {
-        boost::this_thread::sleep_for(boost::chrono::milliseconds(update_interval_ms));
+        std::this_thread::sleep_for(std::chrono::milliseconds(update_interval_ms));
         if (attr_type == 3)
           get_register_data(address, ( ((int*) out)+sample) );
         else {
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 81879a7..eaa7047 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -32,5 +32,5 @@ GR_PYTHON_INSTALL(
     FILES
     __init__.py
     attr_updater.py
-    DESTINATION ${GR_PYTHON_DIR}/iio
+    DESTINATION ${GR_PYTHON_DIR}/gnuradio/iio
 )
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 5792469..753246d 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -52,7 +52,7 @@ GR_SWIG_MAKE(iio_pluto_sink_swig iio_pluto_sink_swig.i)
 # Install the build swig module
 ########################################################################
 GR_SWIG_INSTALL(TARGETS iio_swig iio_pluto_source_swig iio_pluto_sink_swig
-	DESTINATION ${GR_PYTHON_DIR}/iio)
+	DESTINATION ${GR_PYTHON_DIR}/gnuradio/iio)
 
 ########################################################################
 # Install swig .i files for development
-- 
2.26.1